2 conditions in 1 alert

Viewing 5 posts - 1 through 5 (of 5 total)
  • #97501

    Hey folks !

    I have a question regarding how to set up two “specific” conditions in my alert.

    I have an open position, I would like to set an alert when 2 candlesticks closes above (or below whatever) the EMA13 line.

    To code that I’d write (myEMA is the EMA13 line):

    if (close[1] > myEMA and open[0] > myEMA and close[0] > myEMA).

    A chart is more explainful than the post, so I joined an example when my alert should pop-up.

    Thank you very much, I hope I was clear enough.

    Regards !

    #97503

    Your code is perfect!

    #97529

    Yes if I was setting up a scanner, but I want to make an alert. I found that I can make two conditions but can’t do the setup explained above.

    #97535

    To set alerts you must do it with the available tool on the platform.

    Screeners, Indicators and Strategies cannot set alerts.

    You might also write an indicator that returns either 0 or 1 when your conditions are false or true, then set an alert on the platform on those returned values.

    #97539

    Ok gotcha ! thanks !

Viewing 5 posts - 1 through 5 (of 5 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login