Join our facebook group for Amibroker afl code discussion https://www.facebook.com/groups/603980776889348

Perfect Stochastic With Buy Sell Arrows



Perfect Stochastic With Buy Sell Arrows
Perfect Stochastic With Buy Sell Arrows


//www.aflcode.com
_SECTION_BEGIN("Cross Stochastic");

uptrend= IIf( StochK(17,9) > StochD(17,9,3), 1, 0 );
downtrend=IIf( StochK(17,9)<StochD(17,9,3), 1, 0 );
crossBuy=Cross(StochK(17,9),StochD(17,9,3));
crossSell=Cross(StochD(17,9,3),StochK(17,9));

 Plot( StochD(17,9,3), _DEFAULT_NAME(), colorRed , ParamStyle("Style") );

Plot( StochK(17,9), _DEFAULT_NAME(), colorBlue , ParamStyle("Style") );


Buy =  Ref(crossBuy,-2)  AND  Ref(StochD(9,5,3),-2) <20 AND Ref(uptrend,-1) AND uptrend ;
Sell = crossSell  AND StochD(9,5,3) > 50 ;

Short=Sell;
Cover=Buy;

PlotShapes( IIf(Buy, shapeUpArrow,0) , colorGreen ,0,StochD(17,9,3),-10);
PlotShapes( IIf(Sell, shapeDownArrow,0) , colorRed ,0, StochD(17,9,3),-10);


_SECTION_END();

Previous
Next Post »