Professional Documents
Culture Documents
Demark 9 Indicator - Sharra
Demark 9 Indicator - Sharra
//@SharraB
indicator("d9 indicator", overlay=true)
var TD = 0.0
var TS = 0.0
TD := close > close[4] ? na(TD[1]) ? 1 : TD[1]+1 : 0
TS := close < close[4] ? na(TS[1]) ? 1 : TS[1]+1 : 0
TDUp = TD - ta.valuewhen(TD < TD[1], TD, 1)
TDDn = TS - ta.valuewhen(TS < TS[1], TS, 1)
plotshape(TDUp==7 ? true : na, style=shape.triangledown, text="7",
color=color.red, location=location.abovebar)
plotshape(TDUp==8 ? true : na, style=shape.triangledown, text="8",
❌",
color=color.red, location=location.abovebar)
plotshape(TDUp==9 ? true : na, style=shape.triangledown, text="
color=color.red, location=location.abovebar)
plotshape(TDDn==7 ? true : na, style=shape.triangleup, text="7",
color=color.green, location=location.belowbar)
plotshape(TDDn==8 ? true : na, style=shape.triangleup, text="8",
✅",
color=color.green, location=location.belowbar)
plotshape(TDDn==9 ? true : na, style=shape.triangleup, text="
color=color.green, location=location.belowbar)
HI All,
Also, before copy and paste the code, please clear all the default script
in the pine editor
After that dont need to save,
Just click add to the Chart, I just double checked for nifty and Bank nifty, no error, working
good