In MT5 first bar is 0, last one is rates_total-1, Bars function is different and open/close/high/low buffers are written without capital letters. All else should work.
Just read the code carefully 20 times and you'll see what and how to fix.
In MT5 first bar is 0, last one is rates_total-1, Bars function is different and open/close/high/low buffers are written without capital letters. All else should work.
Just read the code carefully 20 times and you'll see what and how to fix.
Kypa,
Thank you for your response. I am new to mql5, learning as we go.
I modified the code as you mentioned however not sure why I am getting this error now. Please take a look and let me know your feedback.
ThanksThe code has to be rewritten because it will not recompile.
Those arrays exist only in OnCalculate, they can't be accessed outside. You must declare something else and replace it in function call or integrate the function in OnCalculate.
Kypa,
Can you please fix the code and upload it, will be much faster to learn that way rather than me trying to fix it which will take forever :)
In MT5 first bar is 0, last one is rates_total-1, Bars function is different and open/close/high/low buffers are written without capital letters. All else should work.
Just read the code carefully 20 times and you'll see what and how to fix.
Thanks for the info. I'll have to learn, too.
Long time I did not play with MQL and suddenly everything is weird and confusing - still using MT4 but code lines automatically turned into MQL5.
For example, I just tested "PlotIndexSetInteger(0,PLOT_ARROW_SHIFT,-80); " which I put into "int OnInit()". No error alert but this line seems not working.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello Group,
I found this indicator for bar numbering which was written in MT4
https://www.mql5.com/en/code/19248
I tried to convert it to MT5 however am getting lot of compilation errors, can some of you gurus out here please help convert this MT5, will be greatly appreciated.
Thanks.