Hi,

Refer to Tomasz's comments in the user guide for AddTextColumn:

"Please note that AddTextColumn takes single string as a parameter, so you can 
only display text that does NOT vary on bar-by-bar basis."

What that means is that if your exploration covers multiple bars, then for each 
symbol, the last value will be repeated for all bars. The text will *not* vary 
bar by bar.

If the information your trying to output can be represented by a single 
character (e.g. "U" for Up and "D" for down in your example), then you can work 
around the AddTextColumn limitation by using AddColumn with the formatChar 
format as follows:

TitleTrend = ( MA( C, 5 ) > MA( C, 10 ) );
Filter = C > 0;
AddColumn( IIF( TitleTrend, Asc( "U" ), Asc( "D" ) ), "Trend", formatChar );

Mike

--- In [email protected], "Pete" <dryhe...@...> wrote:
>
> Well I spent some time searching for this and found nothing. I have tried 
> many different methods to print text to an exploration and cannot get the 
> desired results. 
> As an example take something simple like this:
> /*
> The line below can be used in the Title statement of the formula 
> and it will faithfully display in the title area the current trend.
> If you click on a section of the chart it will display the trend for
> the particular point in time
> */
> TitleTrend = WriteIf(MA(C,5) > MA(C,10), "UP", "DWN");
> /*
> Now, just try to used this in an exploration. It does not work. for
> some reason it only display's one value for all resulting lines of
> the exploration.
> */
> filter = C > 0;
> AddTextColumn(TitleTrend, "Trend");
> 
> So what gives? How come this does not work? More importantly, has anyone 
> found a way to get it to work?
> Thanks for taking the time to reply.
> 
>   Pete  :-)
>


Reply via email to