// Downloaded From https://www.WiseStockTrader.com SetChartOptions(0,chartShowArrows|chartShowDates); SetChartBkColor(ParamColor("bkcolor",ColorRGB(0,0, 0))); GfxSetBkMode(0); GfxSetOverlayMode(1); SetBarFillColor(IIf(C>O,ParamColor("Candle UP Color", colorGreen),IIf(C<=O,ParamColor("Candle Down Color", colorRed),colorLightGrey))); Plot(C,"\nPrice",IIf(C>O,ParamColor("Wick UP Color", colorDarkGreen),IIf(C<=O,ParamColor("Wick Down Color", colorDarkRed),colorLightGrey)),64,0,0,0,0); SetTradeDelays(1,1,1,1); _SECTION_BEGIN("Trade triangle-traderzone"); TimeFrameSet(in15Minute); HMAA = Param("H-MA1", 12, 2, 30, 1, 10 ); H2 = MA(C, HMAA ); Hc=C; TimeFrameRestore(); Hp=TimeFrameExpand(H2,in15Minute,expandFirst); hc=TimeFrameExpand(hc,in15Minute,expandFirst); //Plot(C,"",IIf(Hc>Hp,colorBrightGreen,colorDarkRed),64); TimeFrameSet(in15Minute); DMAA = Param("D-MA",250, 2, 500, 1, 10 ); DP = MA(C, DMAA ); Dc=C; TimeFrameRestore(); dp=TimeFrameExpand(DP,in15Minute,expandFirst); dc=TimeFrameExpand(Dc,in15Minute,expandFirst); Plot( Hp,"HMA",IIf(hp>dp,colorLime,colorRed),styleLine); Plot(dp ,"DMA",colorWhite,styleLine); Buy=Cross(Hp,dp); Sell=Cross(dp,Hp); Buy=ExRem(Buy,Sell); Sell=ExRem(Sell,Buy); BuyPrice=ValueWhen(Buy,C); SellPrice=ValueWhen(Sell,C); PlotShapes(IIf(Buy, shapeSquare, shapeNone),colorGreen, 0, L, Offset=-100); PlotShapes(IIf(Buy, shapeSquare, shapeNone),colorLime, 0,L, Offset=-110); PlotShapes(IIf(Buy, shapeUpArrow, shapeNone),colorWhite, 0,L, Offset=-105); PlotShapes(IIf(Sell, shapeSquare, shapeNone),colorRed, 0, H, Offset=100); PlotShapes(IIf(Sell, shapeSquare, shapeNone),colorOrange, 0,H, Offset=110); PlotShapes(IIf(Sell, shapeDownArrow, shapeNone),colorWhite, 0,H, Offset=-105); _SECTION_BEGIN("L.T.P."); cx = Param( "cxposn", 1000, 0, 1250, 1 ); cy = Param( "cyposn", 25, 0, 500, 1 ); GfxSelectFont( "Candara", 18, 98, False ); GfxSetBkColor( colorBlack ); GfxSetTextColor( colorWhite ); GfxTextOut( "L.T.P. " + C + " ", cx, cy ); _SECTION_END(); _SECTION_BEGIN("Title"); DODay = TimeFrameGetPrice("O", inDaily); DHiDay = TimeFrameGetPrice("H", inDaily); DLoDay = TimeFrameGetPrice("L", inDaily); Title = EncodeColor(colorWhite)+"* Long Buy Sell Signals * "+EncodeColor(colorWhite)+ Name() + ", " + Interval(2) + ", " + Date() + EncodeColor(colorWhite) + "\nO " + EncodeColor(colorWhite) + O + ", H : " + H + ", L : " + L + ", C : " + C + EncodeColor(colorWhite)+ "\n Day-Open : " +DODay + " Day-High : " +DHiDay + " Day-Low : " + DLoDay + EncodeColor(colorLime)+ WriteIf (Buy , " GO LONG / Reverse Signal at "+C+" ","")+ WriteIf (Sell , " EXIT LONG / Reverse Signal at "+C+" ","")+"\n"+EncodeColor(colorYellow)+ WriteIf(Sell , "Total Profit/Loss for the Last Trade Rs."+(C-BuyPrice)+"","")+ WriteIf(Buy , "Total Profit/Loss for the Last trade Rs."+(SellPrice-C)+"",""); _SECTION_BEGIN("Background text"); C13=Param("fonts",20,10,30,1 ); C14=Param("left-right",2.1,1.0,5.0,0.1 ); C15=Param("up-down",12,1,20,1 ); Miny = Status("axisminy"); Maxy = Status("axismaxy"); lvb = Status("lastvisiblebar"); fvb = Status("firstvisiblebar"); pxwidth = Status("pxwidth"); pxheight = Status("pxheight"); GfxSetBkMode(transparent=1); GfxSetOverlayMode(1); GfxSelectFont("Candara", Status("pxheight")/C13 ); GfxSetTextAlign( 6 ); GfxSetTextColor( ColorRGB (217,217,213)); GfxTextOut( Name(), Status("pxwidth")/C14, Status("pxheight")/C15 ); GfxSelectFont("Tahoma", Status("pxheight")/C13*0.5 ); GfxSetTextColor( ColorRGB (103,103,103)); GfxTextOut( "By", Status("pxwidth")/C14, Status("pxheight")/C15*2.5 ); GfxSelectFont("Candara", Status("pxheight")/C13*0.5 ); GfxSetTextColor( ColorRGB (103,103,103)); GfxTextOut( "Sai Stock Broking 09825340778", Status("pxwidth")/C14, Status("pxheight")/C15*4 ); GfxSelectFont("MS Sans Serif", 10, 500, False, False, 0); _SECTION_END(); SetChartBkColor(colorBlack); Factor=Param("Factor",3,1,10,1); Pd=Param("ATR Periods",10,1,100,1); Up=(H+L)/2+(Factor*ATR(Pd)); Dn=(H+L)/2-(Factor*ATR(Pd)); iATR=ATR(Pd); TrendUp=TrendDown=Null; trend[0]=1; changeOfTrend=0; flag=flagh=0; for (i = 1; i Up[i-1]) { trend[i]=1; if (trend[i-1] == -1) changeOfTrend = 1; } else if (Close[i]0) { flag=1; } else { flag=0; } if (trend[i]>0 && trend[i-1]<0) { flagh=1; } else { flagh=0; } if (trend[i]>0 && Dn[i]Up[i-1]) { Up[i]=Up[i-1]; } if (flag==1) { Up[i]=(H[i]+L[i])/2+(Factor*iATR[i]);; } if (flagh==1) { Dn[i]=(H[i]+L[i])/2-(Factor*iATR[i]);; } if (trend[i]==1) { TrendUp[i]=Dn[i]; if (changeOfTrend == 1) { TrendUp[i-1] = TrendDown[i-1]; changeOfTrend = 0; } } else if (trend[i]==-1) { TrendDown[i]=Up[i]; if (changeOfTrend == 1) { TrendDown[i-1] = TrendUp[i-1]; changeOfTrend = 0; } } } TrendSL=IIf(trend==1,TrendUp,TrendDown); for(i=BarCount-1;i>1;i--) { if(Buy[i] == 1) { entry = C[i]; sig = "BUY"; sl = TrendSL[i]; tar1 = entry + (entry * .0050); tar2 = entry + (entry * .0099); tar3 = entry + (entry * .0149); tar4 = entry + (entry * .0210); tar5 = entry + (entry * .0269); tar6 = entry + (entry * .0325); bars = i; i = 0; } if(Sell[i] == 1) { sig = "SELL"; entry = C[i]; sl = TrendSL[i]; tar1 = entry - (entry * .0050); tar2 = entry - (entry * .0099); tar3 = entry - (entry * .0149); tar4 = entry - (entry * .0210); tar5 = entry - (entry * .0269); tar6 = entry - (entry * .0325); bars = i; i = 0; } } Offset = 20; Clr = IIf(sig == "BUY", colorLime, colorRed); ssl = IIf(bars == BarCount-1, TrendSL[BarCount-1], Ref(TrendSL, -1)); sl = ssl[BarCount-1]; Plot(LineArray(bars-Offset, tar1, BarCount, tar1,1), "", Clr, styleLine, Null, Null, Offset); Plot(LineArray(bars-Offset, tar2, BarCount, tar2,1), "", Clr, styleLine, Null, Null, Offset); Plot(LineArray(bars-Offset, tar3, BarCount, tar3,1), "", Clr, styleLine, Null, Null, Offset); Plot(LineArray(bars-Offset, tar4, BarCount, tar4,1), "", Clr, styleLine, Null, Null, Offset); Plot(LineArray(bars-Offset, tar5, BarCount, tar5,1), "", Clr, styleLine, Null, Null, Offset); Plot(LineArray(bars-Offset, tar6, BarCount, tar6,1), "", Clr, styleLine, 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