I tried but giving me false signals
It looks my logic is wrong
If anyone can correct please
It looks my logic is wrong
If anyone can correct please
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", colorBlack ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() );
_SECTION_END();
DayO = TimeFrameGetPrice("O", inDaily, 0);
DayH = TimeFrameGetPrice("H", inDaily, 0);
DayL = TimeFrameGetPrice("L", inDaily, 0);
Buy = DayO + 10 ;
Sell = DayO - 10 ;
Buy = ExRem(Buy, Sell);
Sell = ExRem(Sell, Buy);
Plot (DayO, "", colorWhite, styleLine + styleDashed + styleNoRescale);
Plot (DayO - 30, "", colorRed, styleLine + styleDashed + styleNoRescale);
Plot (DayO + 30, "", colorGreen, styleLine + styleDashed + styleNoRescale);
/* Plot Buy and Sell Signal Arrows */
PlotShapes(IIf(Buy, shapeSquare, shapeNone),colorGreen, 0, L, Offset=-40);
PlotShapes(IIf(Buy, shapeSquare, shapeNone),colorLime, 0,L, Offset=-50);
PlotShapes(IIf(Buy, shapeUpArrow, shapeNone),colorWhite, 0,L, Offset=-45);
PlotShapes(IIf(Sell, shapeSquare, shapeNone),colorRed, 0, H, Offset=40);
PlotShapes(IIf(Sell, shapeSquare, shapeNone),colorOrange, 0,H, Offset=50);
PlotShapes(IIf(Sell, shapeDownArrow, shapeNone),colorWhite, 0,H, Offset=-45);