Good morning, which one of you uses such an indicator for MT4? You could post it here thanks
Prior Daily OHLC is a simple code snippet which could benefit pure price action based day traders who monitors Breakout(BO) and Breakout failures(BOF) at lower timeframes. It also helps traders who want to study how the price behaves near to the previous day OHLC(open,high,low,close) values.
Below is the AFL Code works with lower timeframes avoid using it on Daily, Weekly or Monthly timeframes
I hope some one can help me, you could do it even the weekly quarterly and annual monthly indicator please think it might be useful to many
Code: Select all
//Coded by Rajandran R
//Website
_SECTION_BEGIN("Prior Day OHLC");
PDH_Color = ParamColor("PDH Color", colorgreen);
PDH_Style = ParamStyle("PDH Style", styleThick);
PDL_Color = ParamColor("PDL Color", colorRed);
PDL_Style = ParamStyle("PDL Style", styleThick);
PDO_Color = ParamColor("PDO Color", colororange);
PDO_Style = ParamStyle("PDO Style", styledots);
PDC_Color = ParamColor("PDC Color", colorbrown);
PDC_Style = ParamStyle("PDC Style", styledots);
PDH = TimeFrameGetPrice( "H", inDaily, -1 );
PDH = IIf(PDH!=Ref(PDH,-1),Null,PDH);
PDH_index = ValueWhen(PDH!=Ref(PDH,-1),BarIndex());
PDL = TimeFrameGetPrice( "L", inDaily, -1 );
PDL = IIf(PDL!=Ref(PDL,-1),Null,PDL);
PDL_index = ValueWhen(PDL!=Ref(PDL,-1),BarIndex());
PDO = TimeFrameGetPrice( "O", inDaily, -1 );
PDO = IIf(PDO!=Ref(PDO,-1),Null,PDO);
PDO_index = ValueWhen(PDO!=Ref(PDO,-1),BarIndex());
PDC = TimeFrameGetPrice( "C", inDaily, -1 );
PDC = IIf(PDC!=Ref(PDC,-1),Null,PDC);
PDC_index = ValueWhen(PDC!=Ref(PDC,-1),BarIndex());
Plot(PDH,"PDH",PDH_Color,PDH_Style);
Plot(PDL,"PDL",PDL_Color,PDL_Style);
Plot(PDO,"PDO",PDO_Color,PDO_Style);
Plot(PDC,"PDC",PDC_Color,PDC_Style);
PlotText("Previous Day High",LastValue(PDH_index)+1,LastValue(TimeFrameGetPrice( "H", inDaily, -1 ),True)*1.0001,PDH_Color);
PlotText("Previous Day Low",LastValue(PDL_index)+1,LastValue(TimeFrameGetPrice( "L", inDaily, -1 ),True)*1.0001,PDL_Color);
PlotText("Previous Day Open",LastValue(PDO_index)+1,LastValue(TimeFrameGetPrice( "O", inDaily, -1 ),True)*1.0001,PDO_Color);
PlotText("Previous Day Close",LastValue(PDC_index)+1,LastValue(TimeFrameGetPrice( "C", inDaily, -1 ),True)*1.0001,PDC_Color);
_SECTION_END();
_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() );
_SECTION_END();