How to set Alerts based on Indicators?
Greetings,
I understand it is possible to set alerts based on price. What I would like to do is set an alert based on an indicator. For example, if I am using an ATR indicator, I could set an alert for when the range reaches a certain value. Or if I am using an RSI indicator, I could set an alert for when the line breaks above 70, or below 30. Is it currently possible to do this?
Thanks in advance.
Dear danielcarlosjohnson welcome to a growing world of PTMC API and yes you can do it very easily. There is a good example with draggable lines and alerts here for the reference.
If you need to calculate RSI variable use this. Based on example just retrieve value in OnQuote() method like this:
if(indicator.GetValue()>70)
Alert(“RSI is above 70, it is time to buy or sell or stay away from a trade”) // it is up to you which strategy to choose
Cheers