Feeding custom values to OnCalculate() (eg. for calculating indicator of an indicator, calculating an indicator on different price data, etc)

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
Hi
I'm sure there's an article out there but I can't quite find the appropriate reference.
In the documentation for OnCalculate()(https://www.mql5.com/en/docs/event_handlers/oncalculate), for the price[] parameter, the documentation mentions "One of the price timeseries or a calculated indicator buffer can be passed as the price[] array."
What's the best practice to pass such a calculated indicator buffer as the parameter? Would you copy the OnCalculate function to a header/include file, and then call the function in the EA?
Grateful if anyone can point me in the right direction
Cheers