Hello everyone,
Hope all is well.
Recently, I try to learn in writing AFL. I have no background in computer programing language. I am learning from published AFL in the forum. However, this time I need favors from advance users in forum to create additional line which content previous value of support (Redline). Before I am asking this issue to forum, I already try to look answers from previous topic / posting in this forum. I am sorry if I am not smart enough exploring the achieves.
My current AFL as follows
Plot( C, "Close", ParamColor("Color", colorDefault ), styleCandle|styleNoTitle | ParamStyle("Style") | GetPriceStyle() );
_SECTION_BEGIN("TRAILING");
StopLength = (2 * ATR(14) );
BuySL = Cross(MA(C,10),Ref(MA(C,10),-1)) AND C>MA(C,10) AND C>O;
SellSL = 0;
ApplyStop(stopTypeTrailing, stopModeBars, stopLength, 1, True, 1);
Intrade = Flip(BuySL, SellSL);
SetOption("EveryBarNullCheck", True);
Stopline = IIf(intrade, HighestSince(BuySL, ((H+L)/2 - StopLength)), Null);
Plot(Stopline, "",colorRed, styleStaircase|StyleThick|styleNoLabel|styleNoTitle,0,0,0,1);
_SECTION_END();
for( i = 0; i < BarCount; i++ );
PlotText("____________________________________________________ TS "+WriteVal(Stopline,1.0),i-31,SelectedValue(Stopline),colorGreen);
Based on the above picture, I want to plottext to describe the support value as my previous support
the blue lines are where the previous support line ploted.
Thank you for your help and assistence.
Regards,
Febri
