Skip to main content

Posts

Showing posts from 2018

10K AFL FREE INTRADAY TRADING.afl

_SECTION_BEGIN("Price1"); SetChartOptions(0,chartShowArrows|chartShowDates); Plot( C, "Close", ParamColor("Color", colorRed ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() ); _SECTION_END(); //_SECTION_BEGIN("Pivot")     YH = TimeFrameGetPrice("H", inDaily, -1);        // yesterdays high     YL = TimeFrameGetPrice("L", inDaily, -1);        //                low     YC = TimeFrameGetPrice("C", inDaily, -1);        //                close     YO = TimeFrameGetPrice("O", inDaily);            // current day open     //Normal Pivot     PP = (YH + YL + YC) / 3;     R1 = (2 * PP) - YL;     R2 = PP + (YH - YL); ...

ST GAP BUY SELL

 _SECTION_BEGIN("st gap buy sell"); Plot( C, "Close", ParamColor("Color", colorDefault ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() ); SetBarsRequired(sbrAll,sbrAll); xx=BarIndex();x=xx;Lx=LastValue(x); rightStrength=Optimize("R_S",Param("R_S",3,1,50,1) ,1,50,1); leftStrength=Optimize("L_S",Param("L_S",3,1,50,1), 1,50,1); function pkID(rightStrength,leftStrength) { pk=H>Ref(HHV(H,leftStrength),-1) AND H>=Ref(HHV(H,rightStrength),rightStrength); return pk; } function trID(rightStrength,leftStrength) { tr=L<Ref(LLV(L,leftStrength),-1) AND L<=Ref(LLV(L,rightStrength),rightStrength); return tr; } pk=pkID(rightStrength,leftStrength); tr=trID(rightStrength,leftStrength); SetChartBkColor(ColorRGB(0,0,0));SetChartOptions(0 ,chartShowDates); SetBarFillColor(IIf(C>O,colorGreen,IIf(C<=O,colorRed,colorLightGrey))); pkHigh1=Ref(ValueWhen(pk,H,1),-(rightStreng...