ManrajKamboj

My trade indicator

NSE:NIFTY   Nifty 50 Index
//@version=3

study(title="The Golden Pivots", shorttitle="TGP", overlay=true)
pivottimeframe = input(title = "Pivot Resolution", defval="D", options=)
dp = input(true, title="Show Floor Pivots")
cp = input(true, title="Show Camarilla Pivots")
hl = input(true, title="Show M, W, D Highs/Lows")
tp = input(false, title="Show Tomorrow Pivots")

//dp in the prefix implies daily pivot calculation
dpopen = security(tickerid, pivottimeframe, open, barmerge.gaps_off, barmerge.lookahead_on)
dphigh = security(tickerid, pivottimeframe, high, barmerge.gaps_off, barmerge.lookahead_on)
dplow = security(tickerid, pivottimeframe, low, barmerge.gaps_off, barmerge.lookahead_on)
dpclose = security(tickerid, pivottimeframe, close, barmerge.gaps_off, barmerge.lookahead_on)
dprange = dphigh - dplow

//Expanded Floor Pivots Formula
pivot = (dphigh + dplow + dpclose ) / 3.0
bc = (dphigh + dplow ) / 2.0
tc = (pivot - bc) + pivot
r1 = (pivot * 2) - dplow
r2 = pivot + (dphigh - dplow)
r3 = r1 + (dphigh - dplow)
r4 = r3 + (r2 - r1)
s1 = (pivot * 2) - dphigh
s2 = pivot - (dphigh - dplow)
s3 = s1 - (dphigh - dplow)
s4 = s3 - (s1 - s2)

//Expanded Camarilla Pivots Formula
h1=dpclose + dprange*(1.1/12)
h2=dpclose + dprange*(1.1/6)
h3=dpclose + dprange*(1.1/4)
h4=dpclose + dprange*(1.1/2)
h5=(dphigh/dplow)*dpclose
l1=dpclose - dprange*(1.1/12)
l2=dpclose - dprange*(1.1/6)
l3=dpclose - dprange*(1.1/4)
l4=dpclose - dprange*(1.1/2)
l5=dpclose - (h5-dpclose)

//Tomorrow's Pivot Calculation

tpopen = security(tickerid, pivottimeframe, open, barmerge.gaps_off, barmerge.lookahead_on)
tphigh = security(tickerid, pivottimeframe, high, barmerge.gaps_off, barmerge.lookahead_on)
tplow = security(tickerid, pivottimeframe, low, barmerge.gaps_off, barmerge.lookahead_on)
tpclose = security(tickerid, pivottimeframe, close, barmerge.gaps_off, barmerge.lookahead_on)
tprange = tphigh - tplow

tppivot = (tphigh + tplow + tpclose ) / 3.0
tpbc = (tphigh + tplow ) / 2.0
tptc = (tppivot - tpbc) + tppivot
tpr1 = (tppivot * 2) - tplow
tps1 = (tppivot * 2) - tphigh
tph3 = tpclose + tprange*(1.1/4)
tpl3 = tpclose - tprange*(1.1/4)

//m,w,d in the prefix implies monthly, weekly and daily
mhigh = security(tickerid, "M", high, lookahead=barmerge.lookahead_on)
mlow = security(tickerid, "M", low, lookahead=barmerge.lookahead_on)
whigh = security(tickerid, "W", high, lookahead=barmerge.lookahead_on)
wlow = security(tickerid, "W", low, lookahead=barmerge.lookahead_on)
dhigh = security(tickerid, "D", high, lookahead=barmerge.lookahead_on)
dlow = security(tickerid, "D", low, lookahead=barmerge.lookahead_on)
//dclose = security(tickerid, "D", close, lookahead=barmerge.lookahead_on)

//Plotting
plot(dp and pivot ? pivot : na, title="Pivot",color= #FF007F, style=cross, transp=0)
plot(dp and bc ? bc : na, title="BC",color= blue, style=cross, transp=0)
plot(dp and tc ? tc : na, title="TC",color= blue, style=cross, transp=0)
plot(dp and r1 ? r1 : na, title="R1",color= green, style=cross, transp=0)
plot(dp and r2 ? r2 : na, title="R2",color= green, style=cross, transp=0)
plot(dp and r3 ? r3 : na, title="R3",color= green, style=cross, transp=0)
plot(dp and r4 ? r4 : na, title="R4",color= green, style=cross, transp=0)
plot(dp and s1 ? s1 : na, title="S1",color= red, style=cross, transp=0)
plot(dp and s2 ? s2 : na, title="S2",color= red, style=cross, transp=0)
plot(dp and s3 ? s3 : na, title="S3",color= red, style=cross, transp=0)
plot(dp and s4 ? s4 : na, title="S4",color= red, style=cross, transp=0)
plot(cp and h5 ? h5 : na, title="H5",color= h5 != h5 ? na : black, transp=0)
plot(cp and h4 ? h4 : na, title="H4",color= h4 != h4 ? na : black, transp=0)
plot(cp and h3 ? h3 : na, title="H3",color= h3 != h3 ? na : black, transp=0)
plot(cp and h2 ? h2 : na, title="H2",color= h2 != h2 ? na : black, transp=0)
plot(cp and h1 ? h1 : na, title="H1",color= h1 != h1 ? na : black, transp=0)
plot(cp and l1 ? l1 : na, title="L1",color= l1 != l1 ? na : black, transp=0)
plot(cp and l2 ? l2 : na, title="L2",color= l2 != l2 ? na : black, transp=0)
plot(cp and l3 ? l3 : na, title="L3",color= l3 != l3 ? na : black, transp=0)
plot(cp and l4 ? l4 : na, title="L4",color= l4 != l4 ? na : black, transp=0)
plot(cp and l5 ? l5 : na, title="L5",color= l5 != l5 ? na : black, transp=0)

plot((isintraday or isdaily or isweekly) and hl ? mhigh : na, title="Monthly High",style=circles, color=#FF7F00, transp=0)
plot((isintraday or isdaily or isweekly) and hl ? mlow : na, title="Monthly Low",style=circles, color=#FF7F00, transp=0)
plot((isintraday or isdaily) and hl ? whigh : na, title="Weekly High",style=circles, color=#FF7F00, transp=0)
plot((isintraday or isdaily) and hl ? wlow : na, title="Weekly Low",style=circles,color=#FF7F00, transp=0)
plot(isintraday and hl ? dhigh : na, title="Daily High",style=circles, color=#FF7F00, transp=0)
plot(isintraday and hl ? dlow : na, title="Daily Low",style=circles, color=#FF7F00, transp=0)
//plot(isintraday and hl ? dclose : na, title="Daily Close",style=circles, color=#FF7F00, transp=0)

plot(tp and tppivot ? tppivot : na, title="Pivot",color= blue, style=cross, transp=0)
plot(tp and tpbc ? tpbc : na, title="BC",color= blue, style=cross, transp=0)
plot(tp and tptc ? tptc : na, title="TC",color= blue, style=cross, transp=0)
plot(tp and tpr1 ? tpr1 : na, title="R1",color= green, style=cross, transp=0)
plot(tp and tps1 ? tps1 : na, title="S1",color= red, style=cross, transp=0)
plot(tp and tph3 ? tph3 : na, title="H3",color= tph3 != tph3 ? na : black, transp=0)
plot(tp and tpl3 ? tpl3 : na, title="L3",color= tpl3 != tpl3 ? na : black, transp=0)

plot(isintraday and tp ? tphigh : na, title="High",style=circles, color=#FF7F00, transp=0)
plot(isintraday and tp ? tplow : na, title="Low",style=circles, color=#FF7F00, transp=0)

//Candle Stick Patterns

DJ1= abs(open - close) < (high - low) * 0.1 and high-low > atr(14)
plotshape(DJ1, title="Doji", location=location.abovebar, color=blue, style=shape.xcross)

OR1 = (open > close and open < close and (low > low) and close > high and (high-low) > atr(14)*1.25) // or close > open
plotshape(OR1, title="Bullish Engulfing", style=shape.arrowup, color = green, location=location.belowbar)

OR2 = (open < close and open > close and (high < high) and close < low and (high-low) > atr(14)*1.25) // or close < open
plotshape(OR2, title="Bearish Engulfing", style=shape.arrowdown, color = red)

WR1 = (low < low and abs(low - min(open,close)) > abs(open-close) * 2 and abs(high-close) < (high - low) * 0.35 and high-low > atr(14))
plotshape(WR1, title="Hammer", location=location.belowbar, color=green, style=shape.arrowup)

WR2 = (high > high and high - max(open,close) > abs(open-close) * 2 and abs(close-low) < (high - low) * 0.35 and high-low > atr(14))
plotshape(WR2, title="Shooting Star", color=red, style=shape.arrowdown)

ER1 = (high-low) > atr(14)*2 and abs(open - close) > (high-low) * 0.5 and open > close and open < close //and abs(open - close) < (high-low) * 0.85
plotshape(ER1, title="Bullish E.Reversal", location=location.belowbar, color=green, style=shape.arrowup)// E denotes Extreme

ER2 = (high-low) > atr(14)*2 and abs(open - close) > (high-low) * 0.5 and open < close and open > close //and abs(open - close) < (high-low) * 0.85
plotshape(ER2, title="Bearish E.Reversal", location=location.abovebar, color=red, style=shape.arrowdown)


///study(title="GOLDEN/SILVER DETECTOR and ESCAPE", overlay=true)

s5ema = ema(close, 5)
s9ema = ema(close, 9)
s21ema = ema(close, 21)
s50ema = ema(close, 50)
s100ema = ema(close, 100)
s200ema = ema(close, 200)

plot(s5ema, title="Ema 5", color = yellow, linewidth = 1, transp=0)
plot(s9ema, title="Ema 9", color = red, linewidth = 1, transp=0)
plot(s21ema, title="Ema 21", color = aqua, linewidth = 1, transp=0)
plot(s50ema, title="Ema 50", color = orange, linewidth = 2, transp=0)
plot(s100ema, title="Ema 100", color = purple, linewidth = 1, transp=0)
plot(s200ema, title="Ema 200", color = blue, linewidth = 2, transp=0)

deathcross = crossunder(s50ema, s200ema)
goldencross = crossover(s50ema, s200ema)
silvercross = crossover(s21ema, s200ema)
onay = crossover(s100ema, s200ema)
al = crossover(close, s21ema)
sat = crossover(s21ema, close)
kac = crossunder(s9ema, s21ema)

plotshape(series=kac, title="kac", style=shape.triangledown, location=location.abovebar, color=red, text="HALA SATMADIYSAN SAT", size=size.large)
plotshape(series=deathcross, title="deathcross", style=shape.triangledown, location=location.abovebar, color=red, text="DEATHCROSS!!!", size=size.large)
plotshape(series=goldencross, title="goldencross", style=shape.triangleup, location=location.belowbar, color=yellow, text="Goldencross", size=size.large)
plotshape(series=silvercross, title="silvercross", style=shape.triangleup, location=location.belowbar, color=silver, text="Silvercross", size=size.large)
plotshape(series=al, title="AL", style=shape.triangleup, location=location.belowbar, color=white, text="AL", size=size.small)
plotshape(series=sat, title="SAT", style=shape.triangledown, location=location.abovebar, color=green, text="SAT", size=size.small)
plotshape(series=onay, title="ONAY", style=shape.triangleup, location=location.belowbar, color=blue, text="ONAY", size=size.small)

//////study("Accurate Swing Trading System",overlay=true)

no=input(3,title="Swing")
Barcolor=input(true,title="Barcolor")
Bgcolor=input(false,title="Bgcolor")

res=highest(high,no)
sup=lowest(low,no)
avd=iff(close>res,1,iff(close<sup,-1,0))
avn=valuewhen(avd!=0,avd,0)
tsl=iff(avn==1,sup,res)

Buy=crossover(close,tsl)
Sell=crossunder(close,tsl)

plotshape(Buy,"BUY", shape.labelup, location.belowbar, color.green, text="BUY",textcolor=color.black)
plotshape(Sell,"SELL", shape.labeldown, location.abovebar, color.red, text="SELL",textcolor=color.black)

colr = close>=tsl ? color.green : close<=tsl ? color.red : na
plot(tsl, color=colr, linewidth=3, title="TSL")
barcolor(Barcolor ? colr : na)
bgcolor(Bgcolor ? colr :na)

alertcondition(Buy, title="Buy Signal", message="Buy")
alertcondition(Sell, title="Sell Signal", message="Sell")


Haftungsausschluss

Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.