Hi Community! Hope all's well!! Just slightly struggling with converting a piece of code(Bollinger Band and MA of the same) from back in the day in MQL4 to MQL5. Will be highly appreciated. Thanks much!!
- Bollinger band indicator's middle band.
- Error - Array out of Range While converting MQL4 Indicator to MQL5 EA Function
- Hour()
Please read the Help - in MQL5, the indicator handle needs to be created ALL ONCE !!! And this is done, as a rule, in OnInit ()!
Vladimir Karputov:
Please read the Help - in MQL5, the indicator handle needs to be created ALL ONCE !!! And this is done, as a rule, in OnInit ()!
Please read the Help - in MQL5, the indicator handle needs to be created ALL ONCE !!! And this is done, as a rule, in OnInit ()!
Hey Vladimir,,, your help is quite appreciated. Quick question as follow up,,, once handle is created at OnInit(),,, how much of the code in the main body will i need to alter. Can i just leave it as is once created at OnInit(),,,, asking because the MODE_UPPER, MODE_LOWER and MODE_MAIN are not recognised!! Kindly. Thanks!
Also Vladimir,,, wouldnt i need to do something about the iMAOnArray???? Thanks!!
An example of creating an iBands indicator
Documentation on MQL5: Technical Indicators / iBands
- www.mql5.com
iBands - Technical Indicators - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
Thanks
Kenneth Njuguna:
Thanks
Hi Vladimir,,,, first off thank you much for your help so far,,, I have managed to figure out most of the conversion,,,, BUT for 1 piece,,,, how to calculate the moving average for the BandWidth Array,,
while(L>=0) { //---- MainL[L] = iMAOnArray(BandWidthL,0,L_MAMA,Shift,MODE_SMA, L); //---- L--; }
What can i use in MQL5/MT5 for the same functionality ??? Kindly!!!
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