Afl code to text out the high low value of the 23 candle any time frame

please help me to text out the high low value of the 23 candle of any time frame
in a message box

@twin, I see that you have read quite a bit, but I have no idea what you really want.

You need to very carefully describe what you are trying to do. Even better, show us the code that you have tried after telling us what you want to do. Then we might be able to see and understand better.

Sorry, not an answer, but without a well defined question, we can't really help.

Snoopy

@snoopy.pa30
I have coded nothing

this is my code

_SECTION_BEGIN("Price");
SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));
Plot( C, "Close", ParamColor("Color", colorDefault ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() ); 
_SECTION_END();

 

and i want to text out the high low of the 23rd candle of the present day .... I dont know if i am right by saying text out ... want the values of that candle to be displayed on the chart

@snoopy.pa30 help plz

@twin, OK, I am assuming that you know very little about AFL.

So, let's break the problem down and work at them one at a time....

Since I only have EOD (End of Day) Data, I can't do the intra day code. But it should be relatively easy to change the conditions to make it apply.

So, let's start with figuring out how to count the bars since some event (day change for you, month change for me).

vmonth = Month();
curmonth = IIf(vmonth == Ref(vmonth, -1), 1, 0);

vcursum = Sumsince(curmonth ==0, curmonth);

Plot(vcursum, "Show", colorRed, styleHistogram);

If you take the above code, make it in to a NEW formula, and then apply it to your chart, it should create a "start step" plot below your price plot.

Now you should be able to alter/change/modify the code to do what you want in the intra day timeframe.

That is your first challenge.

Then can you find what value you would need to use as a trigger for knowing which bar you need the High and Low values from.

Good luck with the homework. If I have made some bad assumptions, I apologize, but I can only work with what you have given me.

Have fun with it, learn lots, start READING the Manual to figure more and more out yourself.

Snoopy