MetaTrader 4 Build 529 beta released with new compiler - page 39
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
Here's the code.
Here is the result of execution in terminal Version 4.0 Build 536
2013.11.11 22:53:08 Test EURJPY,M1: prevClose0!!!!! = 133.02 iClose(NULL,PERIOD_M1,0) =133.02
2013.11.11 22:53:08 Test EURJPY,M1: prevVolume0!!!!! = 133.02 iVolume(NULL,PERIOD_M1,0) =133.02
2013.11.11 22:53:08 Test EURJPY,M1: prevtime0!!!!! = 2013.11.11 22:38:00 iTime(NULL,PERIOD_M1,0) =2013.11.11 22:38:00
2013.11.11 22:52:25 Test EURJPY,M1:
2013.11.11 22:52:25 Test EURJPY,M1: prevClose0!!!!! = 133.02 iClose(NULL,PERIOD_M1,0) =133.02
2013.11.11 22:52:25 Test EURJPY,M1: prevVolume0!!!!! = 133.02 iVolume(NULL,PERIOD_M1,0) =133.02
2013.11.11 22:52:25 Test EURJPY,M1: prevtime0!!!!! =2013.11.11 22:38:00 iTime(NULL,PERIOD_M1,0) =2013.11.11 22:38:00
As you can see neither iClose, nor iVolume, nor iTime changes.
I assume so, and so do the other functions that start with i.
Also, the iVolume function in this example shows clearly not Volume.
At the same time in the tester, everything works and changes except iVolume. It doesn't work there either.
Note.
Here's the code.
Here is the result of execution in terminal Version 4.0 Build 536
2013.11.11 22:53:08 Test EURJPY,M1: prevClose0!!!!! =133.02 iClose(NULL,PERIOD_M1,0) =133.02
2013.11.11 22:53:08 Test EURJPY,M1: prevVolume0!!!!! =133.02 iVolume(NULL,PERIOD_M1,0) =133.02
2013.11.11 22:53:08 Test EURJPY,M1: prevtime0!!!!! =2013.11.11 22:38:00 iTime(NULL,PERIOD_M1,0) =2013.11.11 22:38:00
2013.11.11 22:52:25 Test EURJPY,M1:
2013.11.11 22:52:25 Test EURJPY,M1: prevClose0!!!!! =133.02 iClose(NULL,PERIOD_M1,0) =133.02
2013.11.11 22:52:25 Test EURJPY,M1: prevVolume0!!!!! =133.02 iVolume(NULL,PERIOD_M1,0) =133.02
2013.11.11 22:52:25 Test EURJPY,M1: prevtime0!!!!! =2013.11.11 22:38:00 iTime(NULL,PERIOD_M1,0) =2013.11.11 22:38:00
As you can see neither iClose, nor iVolume, nor iTime changes.
I assume that other functions which start with i do not change either.
Also, the iVolume function in this example clearly shows not Volume.
At the same time in the tester, everything works and changes except iVolume. It doesn't work there either.
Note.
Well, I did. What's wrong?
Right...
The iTime(NULL,PERIOD_M1,0) function gives the wrong time from the terminal on the left.
Terminal gives 2013.11.11 22:53:08, iTime gives 2013.11.11 22:38:00, and should give
2013.11.11 22:53:00
iVolume(NULL,PERIOD_M1,0) should return some integer, for example 1, 2, 3, 100, not
as in this example 133.02
iClose should give out 133.02 in the first case, and 133.03 in the second.
All these functions work a little differently, on a minute-by-minute basis. Your printing works in ticks. Time in MT is counted in seconds.
And the second terminal, in general, on the left :)
All these functions work a little differently, on a minute-by-minute basis. Your printing works in ticks. Time in MT is counted in seconds.
And the second terminal, in general, on the left :)
Look, I understand that you have no one to talk to in the evening.
I know that the minutes, that's why in the printout of the result and showed SPECIAL
two results at different minutes.
And besides, this message was not for you, but for the developers.
iVolume(NULL,PERIOD_M1,0) should return an integer, for example 1, 2, 3, 100, but not
as in this example 133.02
Looks like iVolume really does return the last price(closing price) instead of volume.
But I was quite amused by the description from the help (the first one is from the file, and the second one is taken from the website)
1
2
Right...
The iTime(NULL,PERIOD_M1,0) function gives the wrong time from the terminal on the left.
Terminal shows 2013.11.11 22:53:08, iTime shows 2013.11.11 22:38:00 and should show
2013.11.11 22:53:00
iVolume(NULL,PERIOD_M1,0) should return some integer, for example 1, 2, 3, 100, not
as in this example 133.02
iClose should output 133.02 in the first case, and 133.03 in the second.
Try using RefreshRates(), OnTick has the same problem, time and prices are not updated in the tester, but when using RefreshRates() all is ok ...
As you can see, neither iClose, nor iVolume, nor iTime changes.
I assume that neither do the other functions that start with i.
Also, the iVolume function in this example shows clearly not Volume.