The problem of transferring from MT4 to MT5. Or, more precisely, the inability to execute some algorithms in MT5 without'err. - page 5

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
The suggestion was to do it on a timer every minute and a half. Not before every tick, and certainly not on a chart event.
Access to timeseries in MT5 is indeed not ideal. But if you need to solve a problem and not find an excuse, then it is possible.
No one is looking for an excuse. You don't know the level of difficulty of the task. That's why you talk so easily about an excuse.
It was suggested to update on a timer every 2 minutes. That's what I have done.
But... This is not enough. Even after this timer update, when creating an event on a chart via the GUI it often happened that calling iBarShift gave -1 . This consequently causes an exit outside the array boundary or some other error. So I tried doing an accessibility check on the timeseries before entering OnChartEvent. For better understanding, I will say, we need to check access to all 21 timeseries. If at least one timeseries is not accessible, it is almost 100% probable that the graphic plots will be made with some kind of error.
The program is complex, with approximately 50,000 lines. On such a volume there are many different timeseries accesses.
Lags occur all the time (In MT5 variant). It works like clockwork in MT4.
MT5 is not interesting for me. I don't use it in trading. I use only MT4. I have started translating the program only on users request. When I faced with such a pain in the neck I decided that it's better to do what is interesting.
During the 14 years of the programme's development some interesting ideas appeared. I am now implementing these ideas.
It was suggested that it should update on a timer every 2 minutes. That's what I've done.
But. This is not enough. Even after this timer update, when creating an event on a chart via the GUI, it often turned out that calling iBarShift gave -1 .
Is the exact ofiBarShift not true by any chance?
I've had difficulties with synchronisation too, even after timed updates. But I couldn't reproduce it ironically, the problem is floating.
MT5 is not interesting to me. I don't use it in trading. Only MT4. I have started translating the program only on users request. When I faced with such a pain in the neck, I decided that it's better to work with the things that are interesting to me.
During the 14 years of the programme's development some interesting ideas have appeared. I am now implementing these ideas.
I'm not advocating for MT5. I just noticed at once that you don't have a great desire to understand it).
Of course, it's better to do what is interesting!
No one is looking for an excuse. You don't know the level of difficulty of the task. That's why you talk about excuses so easily.
The suggestion was to update on a timer every 2 minutes. That's what I've done.
But... This is not enough. Even after this timer update, when creating an event on a chart via the GUI it often happened that calling iBarShift gave -1 . This consequently causes an exit outside the array boundary or some other error. So I tried doing an accessibility check on the timeseries before entering OnChartEvent. For better understanding, I will say, we need to check access to all 21 timeseries. If at least one timeseries is not accessible, it is almost 100% probable that the graphic plots will be made with some kind of error.
The program is complex, with about 50,000 lines. On such a volume there are many different timeseries accesses.
Lags occur all the time (In MT5 variant). It works like clockwork in MT4.
MT5 is not interesting for me. I don't use it in trading. I use only MT4. I have started translating the program only on users request. When I faced with such a pain in the neck I decided that it's better to do what is interesting.
During the 14 years of the programme's development some interesting ideas appeared. I am now implementing these ideas.
Cache your timeseries.
What do you mean? Manually make your own caches?
What do you mean? Manually make your own caches?
Does iBarShift's exact value happen to be true?
true. I need to know the exact bar number.
Count all the timeseries once, and then only add more. You can do it in the window.
So you suggest not using buffers, but working with your arrays?
What are buffers for then?
So you propose to make your own crutch, instead of buffers :(
And instead of iTime, iLow, etc. make your own functions... Rewrite everything in its own way, bypassing functions that don't work from MT5...
This is drastic. But let enthusiasts do it. I'll stand aside. I won't even watch the process.
So you suggest not using buffers, but working with your own arrays?
So you suggest not using buffers, but working with your arrays?
What are buffers for then?
So you propose to make your own crutch, instead of buffers :(
And instead of iTime, iLow, etc. make your own functions... Rewrite everything in their own way, bypassing functions that don't work from MT5...
true. I need to know the exact bar number.
Then there is an error in logic, perhaps. There may not be a bar.