Check ObjectGetValueByTime() and ObjectGetValueByShift() functions.
Use them to read trend line values at required time/bar.

ObjectGetValueByTime - Object Functions - MQL4 Reference
- docs.mql4.com
ObjectGetValueByTime - Object Functions - MQL4 Reference

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
I am trying to send a notification when an RSI crosses a trendline on the indicator window, how can I do this?
I am trying to test a strategy for a month from now. I want to draw a trend line manually on RSI Indicator window, then add a script or EA to alert me when RSI crosses/ touches that trendline.
I know how to calculate RSI on mql4 and use "Alert" and "SendNotification" functions, but I don't want to draw a trend line from it because of precision issues. So, How can I create that alert after drawing a trendline manually?
Consider an image above, I need an alert when RSI(in blue) crosses/ touches trendline(in red).
I'll appreciate any help including a reference if a similar question was posted before.
Thank you.