Help AFL

jlmalhotra

Active Member
#4
_SECTION_BEGIN("BreakOut");
no=Param( "Swing", 2, 1, 55 );
tsl_col=ParamColor( "Color", colorDarkTeal );
res=HHV(H,no);
sup=LLV(L,no);
avd=IIf(C>Ref(res,-1),1,IIf(C<Ref(sup,-1),-1,0));
avn=ValueWhen(avd!=0,avd,1);
tsl=IIf(avn==1,sup,res);

Plot(tsl, _DEFAULT_NAME(), tsl_col, styleStaircase);

Buy=Cross(C,tsl);
Sell=Cross(tsl,C);
shape=Buy*shapeUpArrow + Sell*shapeDownArrow;
PlotShapes(shape,IIf(Buy,tsl_col,tsl_col),0,IIf(Buy,Low,High));
_SECTION_END();
 
#6
Hello,

Thank you very much by the AFL, jlmalhotra. Although he is not exactly the same, I believe that merit will be able to me.
I have stuck the code in Amibroker in the same graph. There are small differences. I do not understand of programming to try to fit it more, perhaps You can. Thanks again

Greetings.
 

Attachments

Similar threads