
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
During the night I noticed one very strange thing, the start time of the bar is reflected with an error - the error was more than a minute. Now I want to check it and I made a test indicator
Log2010.06.18 10:42:03 prov_tick (EURUSD,M1) tick #=6 i=50558 c=1.23797 time[i]=2010.06.18 08:41:00 time=2010.06.18 08:42:05 delta=5
2010.06.18 10:40:59 prov_tick (EURUSD,M1) tick #=5 i=50557 c=1.23848 time[i]=2010.06.18 08:40:00 time=2010.06.18 08:41:01 delta=1
2010.06.18 10:40:01 prov_tick (EURUSD,M1) tick #=4 i=50556 c=1.23862 time[i]=2010.06.18 08:39:00 time=2010.06.18 08:40:04 delta=4
2010.06.18 10:39:03 prov_tick (EURUSD,M1) tick #=3 i=50555 c=1.23881 time[i]=2010.06.18 08:38:00 time=2010.06.18 08:39:05 delta=5
2010.06.18 10:38:30 prov_tick (EURUSD,M1) tick#2 i=50554 c=1.23859 time[i]=2010.06.18 08:37:00 time=2010.06.18 08:38:31 delta=31
2010.06.18 10:38:30 prov_tick (EURUSD,M1) tick#1 i=50553 c=1.23858 time[i]=2010.06.18 08:36:00 time=2010.06.18 08:38:31 delta=31
The first two ticks are clear, it's an indicator start. But next ones .... It turns out that there is a new bar according to the server time, while this tick belongs to the old bar. At night this delta is a nightmare...
Question to the developers is a bug ? Or so it was conceived?
Z.I. while writing this is what appears in the log
2010.06.18 10:45:09 prov_tick (EURUSD,M1) tick #=9 i=50561 c=1.23787 time[i]=2010.06.18 08:44:00 time=2010.06.18 08:45:12 delta=12
During the night I noticed one very strange thing, the start time of the bar is reflected with an error - the error was more than a minute. Now I've decided to check it and created a test indicator
If you add rates_total to the output, you will see that errors occur when comparing the current minutes with the minutes of the previous bar.
That is, time[rates_total-2].
Also, the delta output is not entirely clear.
https://www.mql5.com/ru/docs/basis/function/events#oncalculate says:
Parameters open[], high[], low[] and close[] contain arrays with the opening, maximum, minimum and closing prices of the current timeframe. Parameter time[] contains an array of open time values, parameter spread[] contains an array with the history of spreads (if a spread is specified for a trade instrument). Parameters volume[] and tick_volume[] contain the history of trade and tick volume, respectively.
During the night I noticed one very strange thing, the start time of the bar is reflected with an error - the error was more than a minute. I've decided to check it now and made a test indicator
Log2010.06.18 10:42:03 prov_tick (EURUSD,M1) tick #=6 i=50558 c=1.23797 time[i]=2010.06.18 08:41:00 time=2010.06.18 08:42:05 delta=5
2010.06.18 10:40:59 prov_tick (EURUSD,M1) tick #=5 i=50557 c=1.23848 time[i]=2010.06.18 08:40:00 time=2010.06.18 08:41:01 delta=1
2010.06.18 10:40:01 prov_tick (EURUSD,M1) tick #=4 i=50556 c=1.23862 time[i]=2010.06.18 08:39:00 time=2010.06.18 08:40:04 delta=4
2010.06.18 10:39:03 prov_tick (EURUSD,M1) tick #=3 i=50555 c=1.23881 time[i]=2010.06.18 08:38:00 time=2010.06.18 08:39:05 delta=5
2010.06.18 10:38:30 prov_tick (EURUSD,M1) tick #=2 i=50554 c=1.23859 time[i]=2010.06.18 08:37:00 time=2010.06.18 08:38:31 delta=31
2010.06.18 10:38:30 prov_tick (EURUSD,M1) tick #1 i=50553 c=1.23858 time[i]=2010.06.18 08:36:00 time=2010.06.18 08:38:31 delta=31
The first two ticks are clear, it's an indicator start. But next ones .... It turns out that there is a new bar according to the server time, while this tick belongs to the old bar. At night this delta is a nightmare...
Question to developers, is it a bug or it was designed that way ?
Z.I. while writing this is what appears in the log
2010.06.18 10:45:09 prov_tick (EURUSD,M1) tick #=9 i=50561 c=1.23787 time[i]=2010.06.18 08:44:00 time=2010.06.18 08:45:12 delta=12
Try to test as follows. Without loop.
Further on the text.
Try checking as follows. Without cycle.
Next in the text.
Oops. Got it. Thanks. I did a check inside the loop.
At the time of the new bar i has not changed. Not economical, the same data is repeatedly calculated. Although...
is this situation https://book.mql4.com/ru/samples/icustom fig.119 excluded in MQL5 if not ? and this indicator template will always output correct close ? or are there any pitfalls ?
P.S. thanks for the scienceWhen I start to run my EA the entire terminal crashes in the tester, but if I put it on a chart everything is fine.
It is proven by experience that about 110 parameters can be digested (and there are questions). At 120, the terminal crashes if the Expert Advisor is specified in the tester.
I have already given some solutions in private, but if something happens, you can also ask the developers. I think they might be able to help with this limitation...
It is proven by experience that about 110 parameters can be digested (and there are questions). At 120 the terminal crashes if the Expert Advisor is specified in the tester.
I have already given some solutions in private, but if anything, you can ask the developers. I think they might be able to help with this limitation...
now the weekend quotes are not coming. running the script
Print(TimeCurrent());
result
2010.06.20 00:26:06 00 (USDJPY,M1) 2010.06.18 22:35:52
although the last bar has the time 2010.06.18 23:00:00
it seems strange, very inconvenient to test the correctness of some functions.
The "Apply" button in the indicator settings window is missing.
It is proven by experience that about 110 parameters can be digested (and there are questions). At 120 the terminal crashes if the Expert Advisor is specified in the tester.
I have already given some solutions in private, but if anything, you can ask the developers. I think they might be able to help with this limitation...
A maximum of 64 parameters can be optimised.