Reading values from multiple indicators in a subwindow

 

Good Day all,

So I've plotted an RSI indicator to the main chart and on the same window (of the RSI), I've plotted several MA's.
Anyone know if there's a way of getting the MA values relative to the subwindow?

I was able to get the MA handles from the subwindow but when retrieving the values, I get the same values as if they were plotted onto the Main Chart.
Please see below.

RSI with MAs


Eg. I have a level 90 on that subwindow and would like know when the MA's touch the 90 level.

 

Access the RSI: put the cursor on iRSI in the Editor and press F1 or read it incl. an example here: https://www.mql5.com/en/docs/indicators/irsi

For each of your RSI you have to declare an individual access via iRSI.

Documentation on MQL5: Technical Indicators / iRSI
Documentation on MQL5: Technical Indicators / iRSI
  • www.mql5.com
iRSI - Technical Indicators - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
 
Try the ChartIndicatorGet function to get the indicator handle and then the CopyBuffer function to get the indicator value.
Reason: