Why is there an additional blank after timeCurrent:?
Why - and this is my main problem - does CopyTime return the time of the previous bar which is the theoretical last bar of Friday (theoretical as the last quotes have the time stamp like 22:59:59) instead of the first bar on Sunday/Monday? To be save I added 5 minutes but still get something wrong - or am I wrong?
Do we have to check all the other integrated Copy.. functions on a weekend?
Why is there an additional blank after timeCurrent:?
Same as 1. It was not an additional blank after timeCurrent, but a missing blank for the 3 next ones.
Why - and this is my main problem - does CopyTime return the time of the previous bar which is the theoretical last bar of Friday (theoretical as the last quotes have the time stamp like 22:59:59) instead of the first bar on Sunday/Monday? To be save I added 5 minutes but still get something wrong - or am I wrong?
Yes you are wrong.
int b = CopyTime("EURUSD",PERIOD_H1,BoW(tB),1,arrTme);
BoW(tB) is D'2022.01.30 00:00:00'. There is no bar at that time, so it returns the time of the previous existing bar. All is good and expected. CopyTime is looking BACK, it will never returns a bar in the future of the start parameter.
As I tried to explain you in your German forum topic, it's important to understand how it works, not how you think it should work.
add 1: Ok my bad - now I see it, sorry. Funny feature if I eliminate the "\n" at "\nBeg..", "\nBoW..", ... the additional blank in the first line disappears? add 2: This part: "%-20s %i %s" is for every 'line' the same so there is 1 and only 1 blank between '...20s' and '%i' - so where is the additional blank, Alain?
Same as 1. It was not an additional blank after timeCurrent, but a missing blank for the 3 next ones.
Yes you are wrong.
BoW(tB) is D'2022.01.30 00:00:00'. There is no bar at that time, so it returns the time of the previous existing bar. All is good and expected. CopyTime is looking BACK, it will never returns a bar in the future of the start parameter.
As I tried to explain you in your German forum topic, it's important to understand how it works, not how you think it should work.
Am I? D'2022.02.03 00:00:00' is a valid h1 bar, it has quotes:
The next one to the left is (Fr.) 5 2022.01.28 23:00 from above.
add 1: Ok my bad - now I see it, sorry. Funny feature if I eliminate the "\n" at "\nBeg..", "\nBoW..", ... the additional blank in the first line disappears? add 2: This part: "%-20s %i %s" is for every 'line' the same so there is 1 and only 1 blank between '...20s' and '%i' - so where is the additional blank, Alain?
I already answered :
It was not an additional blank after timeCurrent, but a missing blank for the 3 next ones.
It wasn't my bad. MQ must have changed something, as previously CopyTime didn't had a problem with server times of the future e.g. to place objects on the chart for the next day ...
Now this fails and CopyTime returns the last known server time :(
This is quite inconvenient, because CopyTime returns the last opening time of a bar before a price gap such as a weekend, but the first opening time after such a gap can then only be determined by trial and error. This now makes it much more difficult to automatically determine the broker's offset time.
I found something strange in the latest update, now the backtest is slower and the backtest results can only be 32%, even though before I was able to get 100% real tick history. I don't know what was changed, but it seems to concern the history data.
I found something strange in the latest update, now the backtest is slower and the backtest results can only be 32%, even though before I was able to get 100% real tick history. I don't know what was changed, but it seems to concern the history data.
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
One simple script for MT5 b.3744 and four questions & problems:
This is printed:
My questions and problems:
instead of the first bar on Sunday/Monday?
To be save I added 5 minutes but still get something wrong - or am I wrong?
One simple script for MT5 b.3744 and four questions & problems:
This is printed:
My questions and problems:
Because you added it.
instead of the first bar on Sunday/Monday?
To be save I added 5 minutes but still get something wrong - or am I wrong?
Yes you are wrong.
BoW(tB) is D'2022.01.30 00:00:00'. There is no bar at that time, so it returns the time of the previous existing bar. All is good and expected. CopyTime is looking BACK, it will never returns a bar in the future of the start parameter.
As I tried to explain you in your German forum topic, it's important to understand how it works, not how you think it should work.
add 1: Ok my bad - now I see it, sorry.
Funny feature if I eliminate the "\n" at "\nBeg..", "\nBoW..", ... the additional blank in the first line disappears?
add 2: This part: "%-20s %i %s" is for every 'line' the same so there is 1 and only 1 blank between '...20s' and '%i' - so where is the additional blank, Alain?
Because you added it.
Same as 1. It was not an additional blank after timeCurrent, but a missing blank for the 3 next ones.Yes you are wrong.
BoW(tB) is D'2022.01.30 00:00:00'. There is no bar at that time, so it returns the time of the previous existing bar. All is good and expected. CopyTime is looking BACK, it will never returns a bar in the future of the start parameter.
As I tried to explain you in your German forum topic, it's important to understand how it works, not how you think it should work.
Am I? D'2022.02.03 00:00:00' is a valid h1 bar, it has quotes:
The next one to the left is (Fr.) 5 2022.01.28 23:00 from above.
add 1: Ok my bad - now I see it, sorry.
Funny feature if I eliminate the "\n" at "\nBeg..", "\nBoW..", ... the additional blank in the first line disappears?
add 2: This part: "%-20s %i %s" is for every 'line' the same so there is 1 and only 1 blank between '...20s' and '%i' - so where is the additional blank, Alain?
I already answered :
It was not an additional blank after timeCurrent, but a missing blank for the 3 next ones.
The "\n" was "eaten" as a character.
Am I? D'2022.02.03 00:00:00' is a valid h1 bar, it has quotes:
The next one to the left is (Fr.) 5 2022.01.28 23:00 from above.
Yes you are. You starting date in CopyTime is not D'2022.02.03 00:00:00, it's D'2022.01.30 00:00:00'.
Yes, you are right, my bad again, I need to take the cucumber slices off my eyes.
Thank you!
It wasn't my bad. MQ must have changed something, as previously CopyTime didn't had a problem with server times of the future e.g. to place objects on the chart for the next day ...
Now this fails and CopyTime returns the last known server time :(
This is quite inconvenient, because CopyTime returns the last opening time of a bar before a price gap such as a weekend, but the first opening time after such a gap can then only be determined by trial and error. This now makes it much more difficult to automatically determine the broker's offset time.
I found something strange in the latest update, now the backtest is slower and the backtest results can only be 32%, even though before I was able to get 100% real tick history. I don't know what was changed, but it seems to concern the history data.
I found something strange in the latest update, now the backtest is slower and the backtest results can only be 32%, even though before I was able to get 100% real tick history. I don't know what was changed, but it seems to concern the history data.
There are no differences in the pictures.