// Downloaded From https://www.WiseStockTrader.com _SECTION_BEGIN("Realtimetips "); 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", colorBlack , styleNoTitle | styleCandle | GetPriceStyle() ); // messageboard = ParamToggle("Message Board","Show|Hide",0); showsl = ParamToggle("Stop Loss Line", "Show|Hide", 0); no=10; res=HHV(H,no); sup=LLV(L,no); avd=IIf(C>Ref(res,-1),1,IIf(C1;i--) { if(Buy[i] == 1) { entry = C[i]; sig = "BUY"; sl = s5d[i]; tar1 = entry + (entry * .0078); tar2 = entry + (entry * .0234); tar3 = entry + (entry * .0356); bars = i; i = 0; } if(Sell[i] == 1) { sig = "SELL"; entry = C[i]; sl = s5d[i]; tar1 = entry - (entry * .0078); tar2 = entry - (entry * .0234); tar3 = entry - (entry * .0356); bars = i; i = 0; } } Offset = 20; Clr = IIf(sig == "BUY", colorLime, colorOrange); ssl = IIf(bars == BarCount-1, s5d[BarCount-1], Ref(s5d, -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), "", colorCustom14, styleLine|styleDots, Null, Null, Offset); Plot(LineArray(bars-Offset, entry, BarCount, entry,1), "", colorTurquoise, styleLine|styleDots, Null, Null, Offset); for (i=bars; i 1; i--) { if(NewDay[i] == 1) { printf("High : " + i); if(width == 1) { DL = IIf(O[i] < C[i], O[i], C[i]); DH = IIf(O[i] > C[i], O[i], C[i]); } else { DL = L[i]; DH = H[i]; } Bars = i; i = -1; } } if(slmode==1) { distance = displacement; } else { distance = ((DH+DL)/2) * .01; } Plot(LineArray(BarCount - (BarCount-Bars+20), DH, BarCount+35, DH, 1), "", colorLime, styleLine|styleThick|styleDots, Null, Null, 20); PlotText("Buy Above " + DH + "; Stop Loss = " + DL, BarCount + 0, DH, colorBlack, colorLime); Plot(LineArray(BarCount - (BarCount-Bars+20), (DH+ distance), BarCount+35, (DH+ distance), 1), "", colorLime, styleLine|styleThick|styleDots, Null, Null, 20); PlotText("Target = " + (DH+ distance), BarCount + 0, (DH+ distance), colorBlack, colorLime); Plot(LineArray(BarCount - (BarCount-Bars+20), DL, BarCount+35, DL, 1), "", colorOrange, styleLine|styleThick|styleDots, Null, Null, 20); PlotText("Sell Below " + DL + "; Stop Loss = " + DH, BarCount + 0, DL, colorBlack, colorOrange); Plot(LineArray(BarCount - (BarCount-Bars+20), (DL-distance), BarCount+35, (DL-distance), 1), "", colorOrange, styleLine|styleThick|styleDots, Null, Null, 20); PlotText("Target = " + (DL-distance), BarCount + 0, (DL-distance), colorBlack, colorOrange); } function PlotIndicators() { SetChartOptions(0,chartShowArrows|chartShowDates); /* Standard Error Bands */ Periods = Param("Standard Error", 80, 3, 200, 1); Smooth = Param("Smooth",14,2,100,1); LRCurve = LinearReg( C, periods ); MALRCurve = MA(LRCurve, Smooth); SEValue = StdErr( C, periods ); SErrorAvg = MA(SEValue, Smooth); LowerBand = MALRCurve - SErrorAvg ; UpperBand = MALRCurve + SErrorAvg ; Plot( MALRCurve , "MidBand", ParamColor("ColorMB",colorIndigo) , styleDashed|styleNoTitle); Plot( LowerBand , "LowerBand", ParamColor("ColorLo",colorOrange) , styleLine|styleThick|styleNoTitle); Plot( UpperBand , "UpperBand", ParamColor("ColorUp",colorGreen) , styleLine|styleThick|styleNoTitle); Ch = TimeFrameGetPrice("C", in1Minute/60); clr = IIf(Ch[BarCount-2] > Ch[BarCount-1],colorRed,colorLime); Plot(LineArray(0,C[BarCount-1],BarCount-1,C[BarCount-1],15), "", Clr, styleLine|styleNoLabel, Null, Null, 30); PlotText("CMP:" + C[BarCount-1], BarCount+5, C[BarCount-1],colorBlack,Clr); LRPeriods = Param("Length", 40, 3, 200, 1); LRCurve = LinearReg( C, LRPeriods ); PlotLR = IIf(LRCurve < LowerBand, (LRCurve + LowerBand)/2, IIf(LRCurve > UpperBand, (LRCurve + UpperBand)/2, LRCurve)); PlotLR = (PlotLR + SwingLine)/2; //Plot( PlotLR , "Stop Loss |", ParamColor("SLColor",colorBlue), 4+8+32+2048); //Plot( SwingLine, "SwingLine", ParamColor( "SWColor", colorBlue ), ParamStyle("StyleSW",style=styleThick|styleNoLabel , mask=maskDefault) ); bc1 = (Cross(C, MALRCurve) OR Cross(C, UpperBand) OR Cross(C, LowerBand)) AND (C > SwingLine); bc2 = Cross(C, SwingLine) AND (C > MALRCurve OR C > UpperBand OR C > LowerBand); sc1 = (Cross(MALRCurve, C) OR Cross(UpperBand, C) OR Cross(LowerBand, C)) AND (C < SwingLine); sc2 = Cross(SwingLine, C) AND (C < MALRCurve OR C < UpperBand OR C < LowerBand); Buy = bc1 OR bc2; Sell = sc1 OR sc2; Buy = ExRem(Buy, Sell); Sell = ExRem(Sell, Buy); //PlotShapes(shapeCircle*Buy + shapeCircle *Sell, IIf(Buy, colorBlue, colorRed), 0, IIf(Buy, L, H), IIf(Buy, -12, 12)); } //PlotDT(); _SECTION_END();