Errors, bugs, questions - page 2190
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
After three minutes of experimentation, I came to the conclusion that the displacement is from
and not from the current position.
So? The number of visible bars is changing. It would be better to check when the chart is moved with the mouse. You can catch it. If there is a shift of a chart with mouse action, then it is not function working.
I didn't talk about a runtime check. If you manually shift the chart to the right by 100 bars and then try to shift it another 10 bars to the right, the offset will be set to 10 from the mark shown in the image. In fact, in this example, the shift will not happen to the right by 10, but to the left by 90.
As for checking... what's the point of checking something that doesn't work as expected? More accurately written not as expected. To move the chart more than once, the offset should be done from CHART_CURRENT_POS, and in the example it was CHART_END.
Forum on trading, automated trading systems and strategy testing
Errors, bugs, questions
Aleksey Vyazmikin, 2018.04.12 15:43
If I call the script often - time after time after execution, the chart offset stops working, i.e. commands for this action are skipped
Hence the problem.
I didn't talk about a runtime check. If you manually shift the chart to the right by 100 bars and then try to shift it another 10 bars to the right, the offset will be set to 10 from the mark shown in the image. In fact, in this example, the shift will not happen to the right by 10, but to the left by 90.
As for checking... what's the point of checking something that doesn't work as expected? More accurately written not as expected. To move the chart more than once, we have to offset from CHART_CURRENT_POS and in the example, from CHART_END.
Hence the problem.
I have not read the code. Maybe it needs it that way.
What I am saying is that the chart offset function is asynchronous, which means that when it returns the success of the execution, it is not about the chart offset, but about the success of putting such an order into the chart's event queue. And this is not the same thing - you know that.
So, based on that, I'm talking about catching the event of the execution of the chart shift command...
I wish I had time to experiment... But alas...
The profiler does not show function signatures, so you can't immediately tell which overloaded function is meant
I.e. the list is filled with __FUNCTION__, while I would like __FUNCSIG__.
Help find the developer's post where the ArrayResize source code was posted. Googling "site:mql5.com/en/forum ArrayResize+reserve" does not help.
I remember that there was a source code. In it you can immediately see the logic of implementation of the reserve-parameter.
Help find the developer's post where the ArrayResize source code was posted. Googling "site:mql5.com/en/forum ArrayResize+reserve" does not help.
I remember that there was a source code. You can immediately see the logic behind implementation of the reserve-parameter.
The source code or pseudocode? These are diametrically different things.
If you rely only on the fact of an offset, you can shift the chart by hand - that's a hole in the logic...
You have to check the offset to the calculated bar apparently, not just the offset. Just need to figure out how to implement it properly...
I didn't talk about checking the execution. If you manually shift the chart to the right by 100 bars and then try to shift another 10 and also to the right with the script, the offset will be set to 10 from the mark indicated on the snapshot. In fact, in this example, the shift will not happen to the right by 10, but to the left by 90.
As for checking... what's the point of checking something that doesn't work as expected? More accurately written not as expected. To move the chart more than once, we have to offset from CHART_CURRENT_POS and in the example we have CHART_END.
Hence the problem.
I need CHART_END, because we are supposed to do the shift in the loop by dates, and it's more convenient to look for dates from either the beginning or the end of the data, rather than from the middle...
Source code, or pseudocode? These are radically different things.
I think the source code was directly posted. But even if there is pseudocode, and it will be useful.
You have to check the offset to the calculated bar apparently, not just the offset. I just need to figure out how to implement it correctly...
I need CHART_END, because it's supposed to do an offset in the cycle by dates, and it's more convenient to look for dates from either the beginning or the end of the data, rather than from the middle...
So there is no problem. The shift will only be unnoticeable if you try to shift by the same number of bars 2 or more times with an unchanged period.
I hope I didn't forget to disable the auto-shift of the chart.
So there is no problem. The shift will only be unnoticeable if you try to shift by the same number of bars 2 or more times with the same period.
I hope I did not forget to disable autoskill?
Autoscroll, of course, is disabled.