
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
What if there are no ticks, weekends? Then a timer will have to be connected.
And there is only one question to solve: how to determine whether ChartNavigate has been successfully executed? The fact that it returns true, it's just "for ticks", it does not help in real work.
I need to check the code I posted above in my Expert Advisor...
I need to check the code I posted above in the EA...
What does the EA have to do with it?
What does this have to do with the councillor?
We should check...
Vladimir Karputov:
This is the indicator - I specifically put a delay of nine ticks, two types of chart movement and a forced re-draw flag (on/off)
You are not a beginner. Why are you misleading? Why are you ignoring what Renat Fatkhullin said?
In your code (as here, so here) it's forced to redraw the chart on every tick by creating comments on every tick.
I.e., regardless of whether the flag in the input parameters is enabled or disabled.
And the inclusion of your flag in the input parameters, in this case, only causes an additional redraw viaChartRedraw().
I.e., instead of being useful, it creates an additional load on the already existing ones by creating comments
P./S.:
Forum on trading, automated trading systems and testing of trading strategies
Errors, bugs, questions
Renat Fatkhullin, 2017.12.05 02:51
...
In MT5, the Comment function explicitly causes the chart to be redrawn...
The difference is just that.
If in MT4 after calling Comment you put ChartRedraw() forcibly, the behavior is still not the same as in MT5. ChartRedraw() in Metatrader 4 ignores the comment value and decides for itself whether or not to update the chart from the last frame. Of course, in the absence of hundreds of quotes per second which would cause a disabling of chart data, ChartRedraw decides "why draw an unchanged chart" and skips drawing the frame.
Metatrader 5 also has the same system, but there are many more cases where unconditional drawing is given priority.
Terminals are graphical applications and can provide hundreds of frames per second and run in lean display mode for the sake of performance.
Hence additional conclusions when running benchmarks:
it is recommended not to mix read/write commands, and to do mass read and mass write separately.
in fact, some tests may end up testing the graphics card rather than the algorithms or functions. the test on a laptop and a desktop computer may show multiple times different results simply because of a 3-5 times slower graphics card
These errors are made all the time by everyone.
Forum on trading, automated trading systems and strategy testing
ChartNavigate during initialization
Vladimir Karputov, 2018.06.25 18:52
Gotta check it...
P./S.: In addition to your second code: before updating the text entry and publication via the same comment, check if the data has changed. If not, it is better to postpone the text update and publication.
I.e., in this case it is whether the number of the first bar on the graph has changed
I'll have to check...
Mmm. I'm not quite sure what that's about. OK, then. I've installed it. Checked it in CHART_BEGIN and CHART_END modes. It's working as advertised. After rebooting, it's OK.
Or are you getting at the point where you need to use a crutch - check the number of the first bar on the chart after ChartNavigate and, if it's not the right one, run ChartNavigate again.
Yes, the way out, of course, I thought about it too. But it's tiresome to remember constantly about such fiches of the terminal. After all, it's quite possible that it's a bug.
P./S.: In addition to your second code: before updating a text entry and publication via the same comment, check if the data has changed. If not, it is better to postpone the text update and publication.
I.e., in this case it's whether the number of the first bar on the chart has changed
Thanks for the info, of course, but we're not talking about performance here. The problem we're discussing is on a slightly different plane, it's just test codes to check if the problem has manifested itself ))
Thanks, of course, for the information, but we're not talking about performance here. The problem we're discussing is on a slightly different plane, it's just test codes to check if the problem appears ))
You're welcome. But see also my other post to which the one you quoted is a postscript.
P./S.: Don't devalue, please. I will not run such codes on mine, knowing what it entails. My equipment is not government-issued
Mmm. I'm not quite sure what that's about. OK, then. Installed it. Checked in CHART_BEGIN and CHART_END modes. Everything works as advertised. After rebooting, it's OK.
Or are you getting at the point where you need to use a crutch - check the number of the first bar on the chart after ChartNavigate and, if it's not the right one, run ChartNavigate again.
Yes, the way out, of course, I thought about it too. But it's tiresome to remember constantly about such fiches of the terminal. After all, it's quite possible that it's a bug.
I used to have a working navigation. Now I have to check it on purpose.
Added: don't pay attention to Comment :)
My navigation used to work. Now I have to check it on purpose.
Added: Ignore the Comment :)
Why? Did I write/report nonsense?