Hi,
I saw some blogs giving projected high and projected low for next day using current day data, i had the excel sheet long back, so i created the afl for the same. the accuracy is more than 60 percent, no system is 100 percent correct.
buy between the previous low and projected low
sell between the previous high and projected high
I saw some blogs giving projected high and projected low for next day using current day data, i had the excel sheet long back, so i created the afl for the same. the accuracy is more than 60 percent, no system is 100 percent correct.
buy between the previous low and projected low
sell between the previous high and projected high
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() );
congestion = (High>Ref(High,-1) AND Low<Ref(Low,-1) AND High<Ref(High,-1) AND Low<Ref(Low,-1)) OR Open > Ref(High,-1) OR Open<Ref(Low,-1);
uptrend = Low>Ref(Low,-1) AND High>Ref(High,-1) AND NOT Open > Ref(High,-1);
downtrend = Low<Ref(Low,-1) AND High<Ref(High,-1) AND NOT Open<Ref(Low,-1) ;
pivot = (Open+High+Low+(2*Close))/5;
avgrange =((High-Low)+(Ref(High,-1)-Ref(Low,-1)))/2;
pl1 = (2*pivot)-High;
ph1 = (2*pivot)-Low;
pl2 = ((2*pivot)-Low)-avgrange;
ph2 = Low+(High-Ref(Low,-1));
pl3 = Low-(Ref(High,-1)-Low);
ph3 =((2*pivot)-High)+avgrange;
WriteIf(Congestion,"projectlow:"+(pl1),WriteIf(uptrend,"projectlow:"+(pl2),WriteIf(downtrend,"projectlow:"+(pl3),"")));
WriteIf(Congestion,"projecthigh:"+(ph1),WriteIf(uptrend,"projecthigh:"+(ph2),WriteIf(downtrend,"projecthigh:"+(ph3),"")));
GfxSetOverlayMode( mode = 0 );
GfxSelectPen( colorOrange, 2 );
GfxSelectSolidBrush( colorBlack );
GfxRoundRect(5,20, 175,100, 16, 20 );
GfxSetBkMode(1);
GfxSelectFont( "Arial",12, 700, False );
GfxSetTextColor( colorPaleGreen );
GfxSetTextAlign(0);
GfxSetTextColor( colorWhite );
GfxTextOut(WriteIf(Congestion,"projectlow:"+(pl1),WriteIf(uptrend,"projectlow:"+(pl2),WriteIf(downtrend,"projectlow:"+(pl3),""))), 8 ,45 );
GfxTextOut(WriteIf(Congestion,"projecthigh:"+(ph1),WriteIf(uptrend,"projecthigh:"+(ph2),WriteIf(downtrend,"projecthigh:"+(ph3),""))), 8 ,25 );
GfxSetTextColor( colorWhite);
GfxTextOut(WriteIf(congestion, "TREND:congestion",""), 8 ,65 );
GfxTextOut(WriteIf(uptrend, "TREND:uptrend",""), 8 ,65 );
GfxTextOut(WriteIf(downtrend, "TREND:downtrend",""), 8 ,65 );
GfxSetTextColor( colorRed );
Plot(pl1,"projected low",colorRed);
Plot(ph1,"projected high",colorBlue);
Plot(pl2,"projected low",colorRed);
Plot(ph2,"projected high",colorBlue);
Plot(pl3,"projected low",colorRed);
Plot(ph3,"projected high",colorBlue);
_SECTION_END();