Previous Day High Low Plotter For Intraday

Previous Day High Low Plotter For Intraday is one of the best Amibroker afl only for intraday traders. As you all know, the previous day high and low also acts as support and resistance, the afl automatically plot it for you. If price is trading about the previous day high it means trend in up and you can go for long. If stock is trading below previous day low, it means trend is down and you can go for short. Taken an entry either after breaking previous day high/low or pull back entry also can be taken depends on stock is overbought or oversold. This alf is made for intraday traders only. The recommended time frame to use this afl is 5 min to 30 min.
Previous Day High Low Plotter For Intraday
Previous Day High Low Plotter For Intraday

//www.aflcode.com
_SECTION_BEGIN("PRASAD SYSTEMS");
Param("DEDICATED TO MY FATHER",5);
_SECTION_END();

_SECTION_BEGIN("BACK COLR");
SetChartBkColor( ParamColor("Chart Color", colorBlack));
SetChartOptions(0,chartShowArrows|chartShowDates);
GfxSetOverlayMode(1);
GfxSelectFont("Tahoma", Status("pxheight")/13 );
GfxSetTextAlign( 6 );// center alignment
GfxSetTextColor( ParamColor("Text Color", ColorHSB( 42, 42, 42 ) ));
GfxSetBkMode(0); // transparent
GfxTextOut( Name(), Status("pxwidth")/2, Status("pxheight")/7);

GfxSelectFont("Tahoma", Status("pxheight")/17 );
GfxTextOut( "HOLY GRAIL", Status("pxwidth")/2, Status("pxheight")/2.6 );

GfxSelectFont("Tahoma", Status("pxheight")/30 );
GfxTextOut( "prasad9rao@gmail.com", Status("pxwidth")/2, Status("pxheight")/2.1);

GfxSelectFont("Arial Bold", Status("pxheight")/15);
GfxTextOut( "PRASAD ANALYSTIC ver 5", Status("pxwidth")/2, Status("pxheight")/20);
_SECTION_END();

GfxSetTextColor(ColorRGB(200, 150, 100) );
GfxSelectFont("Arial BOLD", Status("pxheight")/60);
 GfxTextOut( "Dedicated to My Father : BALKRISHNA RAO",Status("pxwidth")/5, Status("pxheight")/1.06);

SetBarFillColor( IIf(O>C,ColorRGB(217,0,0),ColorRGB(1,149,38)) ); 
Plot( C, "Price", IIf( O>C,ColorRGB(255,208,82), ColorRGB(255,255,255)), styleCandle );



SetBarFillColor( IIf(O>C,colorDarkRed, colorBrightGreen ) ); 
Plot( C, "Price", IIf( O>C,colorRed, colorGreen ), styleCandle );

HaClose =EMA((O+H+L+C)/4,3);
HaOpen = AMA( Ref( HaClose, -1 ), 0.5 ); 
HaHigh = Max( H, Max( HaClose, HaOpen ) ); 
HaLow = Min( L, Min( HaClose, HaOpen ) );



_SECTION_BEGIN("HA");
 
//calculates floor pivots from previous days data & plots it on the present intraday chart.
//RED LINE = RESISTANCE
//RED DASHED LINE = MINI RESISTANCE
//BLUE LINE = SUPPORT
//BLUE DASHED LINE = MINI SUPPORT
//YELLOW DOTTED LINE = PIVOT
//RED DOTTED LINE = PREVIOUS Day High
//BLUE DOTTED LINE = PREVIOUS Day Low
//BLACK DOTTED LINE = PREVIOUS Day Close
 
 
//2 - IN - 1 PRICE CHART
Pstyle = ParamToggle("Heikin Ashi","On|Off",1);
if(Pstyle==0){
HaClose = (O+H+L+C)/4;
HaOpen = AMA( Ref( HaClose, -1 ), 0.5 );
HaHigh = Max( H, Max( HaClose, HaOpen ) );
HaLow = Min( L, Min( HaClose, HaOpen ) );
PlotOHLC(HaOpen,HaHigh,HaLow,HaClose,"",IIf(HaClose >
HaOpen,colorGreen,colorBrown),styleCandle);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g,
Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));
 
}
else {
_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", colorBlack ), styleNoTitle |
ParamStyle("Style") | GetPriceStyle() ); 
}
 
 
//TIME FRAME CALCULATION
H1 = TimeFrameGetPrice("H", inDaily, -1);       // yesterdays high
L1 = TimeFrameGetPrice("L", inDaily, -1);       //              low
C1= TimeFrameGetPrice("C", inDaily, -1);        //              close
DayO = TimeFrameGetPrice("O", inDaily);         // current day open
 
 
// PIVOT Calculation
P = ( H1+ L1 + C1 )/3;
S1 = (2*P)-H1;
R1 = (2*P)-L1;
S2 = P -(H1 - L1);
S3 = S1 - (H1-L1); 
R2 = P +(H1 - L1);
R3 = R1 +(H1-L1);
 
// PIVOT mid points
MIDR1 = (P+R1)/2;
MIDR2 = (R1+R2)/2;
MIDR3 = (R2+R3)/2;
MIDS1 = (P+S1)/2;
MIDS2 = (S1+S2)/2;
MIDS3 = (S2+S3)/2;
 
//PLOTS
 
Plot(H1, "",colorWhite,styleDots+styleNoRescale);
Plot(L1, "",colorCustom12,styleDots+styleNoRescale);
//Plot(C1, "",colorWhite,styleLine+styleNoRescale);
 
// text section
 
"HIGH /LOW /CLOSE = " +H +" / "+ L+" / "+ C +"\n";
"H1 /L1 /C1 = " +H1 +" / "+ L1+" / "+ C1 +"\n";
 
"R3 = " +R3;
"midr3 = " +MIDR3;
"R2 = " +R2;
"midr2 = " +MIDR2;
"R1 = " +R1;
"midr1 = " +MIDR1;
"*************";
"p = " +p;
"*************";
"mids1 = " +MIDS1;
"S1 = " +S1;
"mids2 = " +MIDS2;
"S2 = " +S2;
"mids3 = " +MIDS3;
"S3 = " +S3;
 
_SECTION_END();
 
//Topping Bar
//Range = H - L ;
//TPB = Volume > MA(Volume,9) AND Close < Low + Range/2 AND Range <= Ref(Range,-1);
//PlotShapes(shapeSmallCircle * TPB,colorYellow,0,H,20);


_SECTION_BEGIN("Name");
GfxSetOverlayMode(1);
GfxSelectFont("Tahoma", Status("pxheight")/8 );
GfxSetTextAlign( 6 );// center alignment
GfxSetTextColor( ColorHSB( 42, 42, 42 ) );
GfxSetBkMode(0); // transparent
GfxTextOut( Name(), Status("pxwidth")/2, Status("pxheight")/12 );
GfxSelectFont("Tahoma", Status("pxheight")/18 );
GfxTextOut( IndustryID(1), Status("pxwidth")/2, Status("pxheight")/4 );

GfxSelectFont("Tahoma", Status("pxheight")/18 );
GfxSelectFont("Tahoma", Status("pxheight")/36 );
GfxTextOut( "PRASAD RAO", Status("pxwidth")/2, Status("pxheight")/3 );
_SECTION_END();

SetBarFillColor( IIf(O>C,colorDarkRed, colorBrightGreen ) ); 
Plot( C, "Price", IIf( O>C,colorRed, colorGreen ), styleCandle );

HaClose =EMA((O+H+L+C)/4,3);
HaOpen = AMA( Ref( HaClose, -1 ), 0.5 ); 
HaHigh = Max( H, Max( HaClose, HaOpen ) ); 
HaLow = Min( L, Min( HaClose, HaOpen ) );
Previous
Next Post »