Did you use the correct form on OnCalculate? Event Handling Functions - Functions - Language Basics - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
int OnCalculate (const int rates_total, // size of the price[] array const int prev_calculated, // bars handled on a previous call const int begin, // where the significant data start from const double& price[] // array to calculate );
William Roeder #:
Did you use the correct form on OnCalculate? Event Handling Functions - Functions - Language Basics - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
Did you use the correct form on OnCalculate? Event Handling Functions - Functions - Language Basics - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
That's not available in MQL4 is it?
William Roeder #: Did you use the correct form on OnCalculate? Event Handling Functions - Functions - Language Basics - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
I don't believe that form is available on MT4/MQL4. I believe it is only available on MT5/MQL5.
William Roeder #:
Did you use the correct form on OnCalculate? Event Handling Functions - Functions - Language Basics - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
Did you use the correct form on OnCalculate? Event Handling Functions - Functions - Language Basics - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
No no i Will use it. But please did you have an example to follow ?
Inehamos gueye #: No no i Will use it. But please did you have an example to follow ?
Both I and Keith have called attention to the fact that, that form of the OnCalculate() event handler, is not available on MQL4, only MQL5.
On MT4, you cannot use the "apply to" ability with custom indicators. You will have to make a separate indicator to do that internally by combining the indicator's calculations.
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 wanted to make my indicator shows the parameter tab "apply to" option with the drop-down menu offering various ENUM_MA_METHOD including the previous or first indicator's data similar to attached.
i've searched in the forum and still not finding the sample code that will enable me to do the above for my indicator. and indicators come with mt4 don't include
the source code that i can use as an example to do so. can someone please give me some sample code for me to solve my problem?