Forum

MQL5: How can I write a function that gets a moving average value of any symbol regardless of what chart the indicator is placed on

Hi, May I ask a question about how to write a function that gets a moving average value of any symbol regardless of what chart the indicator is placed on I have attached the test files and see below attempt I made, but it returns a value of zero. Thanks! double GetEMAValue( string symbol) {