Welcome to the BEST forum for traders

Did you know we're sharing tons of exclusive content here?
Our community is growing quickly. Take a look around and say "Hello".

  • Forums
  • Pinescript
  • How to create an Alert on the Moment " ✅" "⚠️" appears. (Push Notification Phone/PC)

How to create an Alert on the Moment " ✅" "⚠️" appears. (Push Notification Phone/PC)

Dec 22, 2021 - 1:52 AM

Viewed 1009 times

https://best-trading-indicator.com/community/bti/forums/4180/topics/55412 COPY
  • Hello guys,

    I tried so many things but i cant achieve it unfortunately.
    Maybe someone can help how to setup an alert on the demarker indicator. I really like to have some kind of push notificaties when the ✅ or ⚠️ Appears.
    Really appreciate it when someone has a solution

    Code:
    //DeMark_9_Indicator_Wealth_Insider
    study(DeMark9 Indicator,overlay=true)
    TD = close > close[4] ?nz(TD[1])+1:0
    TS = close < close[4] ?nz(TS[1])+1:0
    TDUp = TD - valuewhen(TD < TD[1], TD , 1 )
    TDDn = TS - valuewhen(TS < TS[1], TS , 1 )
    plotshape(TDUp==7?true:na,style=shape.triangledown,text=7,color=green,location=location.abovebar)
    plotshape(TDUp==8?true:na,style=shape.triangledown,text=8,color=green,location=location.abovebar)
    plotshape(TDUp==9?true:na,style=shape.triangledown,text=⚠️,color=green,location=location.abovebar)
    plotshape(TDDn==7?true:na,style=shape.triangleup,text=7,color=red,location=location.belowbar)
    plotshape(TDDn==8?true:na,style=shape.triangleup,text=8,color=red,location=location.belowbar)
    plotshape(TDDn==9?true:na,style=shape.triangleup,text=,color=red,location=location.belowbar)

    Kind regards and send you many blessings
    Dragan

    demar.jpg

    0
  • Hi Dragan

    You're missing the alertcondition functions I think

    You need to add them in the code to enable the alerts creation through the TradingView UI

    //@version=4
    //DeMark_9_Indicator_Wealth_Insider
    study(DeMark9 Indicator,overlay=true)
    TD = close > close[4] ?nz(TD[1])+1:0
    TS = close < close[4] ?nz(TS[1])+1:0
    TDUp = TD - valuewhen(TD < TD[1], TD , 1 )
    TDDn = TS - valuewhen(TS < TS[1], TS , 1 )
    plotshape(TDUp==7?true:na,style=shape.triangledown,text=7,color=green,location=location.abovebar)
    plotshape(TDUp==8?true:na,style=shape.triangledown,text=8,color=green,location=location.abovebar)
    plotshape(TDUp==9?true:na,style=shape.triangledown,text=⚠️,color=green,location=location.abovebar)
    plotshape(TDDn==7?true:na,style=shape.triangleup,text=7,color=red,location=location.belowbar)
    plotshape(TDDn==8?true:na,style=shape.triangleup,text=8,color=red,location=location.belowbar)
    plotshape(TDDn==9?true:na,style=shape.triangleup,text=✅,color=red,location=location.belowbar)
    
    alertcondition(TDUp==9, "✅", "✅")
    alertcondition(TDDn==9, "⚠️", "⚠️")
    
    This post was edited Dec 22, 2021 08:26AM
    0
CONTENTS