// Downloaded From https://www.WiseStockTrader.com _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(); _SECTION_BEGIN("SAR"); acc = Param("Acceleration", 0.1, 0, 1, 0.001 ); accm = Param("Max. acceleration", 0.06, 0, 1, 0.001 ); SAR1 = SAR(acc,accm); Buy1 = Cross(Open, SAR(acc,accm)); Sell1 = Cross(SAR(acc,accm), Open ); if (ParamToggle("SAR","Show|Hide",1)){ Plot(SAR1,"",1,styleDots|styleNoLine); PlotShapes(IIf(Buy1,shapeUpArrow,shapeNone), colorYellow, 0, Low, Offset=-15); PlotShapes(IIf(Buy1,shapeSmallCircle,shapeNone), colorYellow, 0, Low, Offset=-28); PlotShapes(IIf(Sell1, shapeDownArrow,shapeNone), colorWhite, 0, High, Offset=-15); PlotShapes(IIf(Sell1, shapeSmallCircle,shapeNone), colorWhite, 0, High, Offset= 28); } _SECTION_END(); messageboard = ParamToggle("Message Board","Show|Hide",0); exitlong = Sell1; PlotShapes(exitlong * shapeDownArrow, colorBlack,0,H,-10); exitshort = Buy1; PlotShapes(exitshort * shapeUpArrow, colorBlack,0,L,-15); Buy = exitshort; Sell = exitlong; Buy = ExRem(Buy,Sell); Sell = ExRem(Sell,Buy); AlertIf( Buy, "", "BUY @ " + C, 1 ); AlertIf( Sell, "", "SELL @ " + C, 2 ); for(i=BarCount-1;i>1;i--) { if(Buy[i] == 1) { entry = C[i]; sig = "BUY"; sl = sar1[i]; tar1 = entry + (entry * .0056); tar2 = entry + (entry * .0116); tar3 = entry + (entry * .0216); bars = i; i = 0; } if(Sell[i] == 1) { sig = "SELL"; entry = C[i]; sl = SAR1[i]; tar1 = entry - (entry * .0056); tar2 = entry - (entry * .0116); tar3 = entry - (entry * .0216); bars = i; i = 0; } } Offset = 20; Clr = IIf(sig == "BUY", colorLime, colorRed); ssl = IIf(bars == BarCount-1, sar1[BarCount-1], Ref(SAR1, -1)); sl = ssl[BarCount-1]; Plot(LineArray(bars-Offset, tar1, BarCount, tar1,1), "", Clr, styleLine|styleDots, Null, Null, Offset); Plot(LineArray(bars-Offset, tar2, BarCount, tar2,1), "", Clr, styleLine|styleDots, Null, Null, Offset); Plot(LineArray(bars-Offset, tar3, BarCount, tar3,1), "", Clr, styleLine|styleDots, Null, Null, Offset); Plot(LineArray(bars-Offset, sl, BarCount, sl,1), "", colorDarkRed, styleLine|styleLine, Null, Null, Offset); Plot(LineArray(bars-Offset, entry, BarCount, entry,1), "", colorGreen, styleLine|styleLine, Null, Null, Offset); for (i=bars; i MDI()AND Signal()PDI()AND Signal()>MACD(); Plot( 2, "ADX",IIf( uptrend, colorGreen, IIf( downtrend, colorRed, colorBlack )), styleOwnScale|styleArea|styleNoLabel, -0.5, 100 ); _SECTION_END(); GraphXSpace=5;