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
A couple of other questions came up along the way:
1. there is a string:
datetime ProvTimeX1=ObjectGetInteger(0, "Y="+IntegerToString(y,0,''),OBJPROP_TIME);
The compiler frowns upon it, writing"possible loss of data due to type conversion". What is wrong here?
2. How does mql5 put data into arrays and distribute them, in which direction?
A couple of other questions came up along the way:
1. there is a string:
datetime ProvTimeX1=ObjectGetInteger(0, "Y="+IntegerToString(y,0,''),OBJPROP_TIME);
The compiler frowns upon it, writing"possible loss of data due to type conversion". What is wrong here?
Well, it is right, you are trying to write into the datetime variable a value long returned by ObjectGetInteger. Do type conversion.
The direction is always the same - from the beginning (the index is zero) to the end, BUT if you do not specify indexing with ArraySetAsSeries function. If the question is about indexing.
Good afternoon, I cannot divide the numbers, the result is 0.0
Why?
Good afternoon, I cannot divide the numbers, the result is 0.0
Why?
Documentation >>> Type conversion
>>Documentation >>> Type conversion
It's stupid of course, that you have to add something to change something, some calculator without dots is fine and it does not need to specify what type of data, but okay, the second way is to add ".0" to the end of the integer
so the correct expression would be like this.
By the way, in some programming language saw a variable so that the terminal selects its type, perhaps it was only for numeric data, but still comfortable, is it not implemented here, I tried to find in the documentation - could not find?In version 4: datetime TimeX2=Time[0]+18000; - increased time value by 5 candles forward
Now in 5 when writing:
When debugging it gives array overflow error and points todatetime line TimeX2=Topen[0]+18000;
Please advise how to get the same result in 5 as it was in 4?
Addendum: It's written correctly, I just made a mistake - in OnInit the array was empty.
In version 4: datetime TimeX2=Time[0]+18000; - increased time value by 5 candles forward
Now in 5 when writing:
When debugging it gives array overflow error and points todatetime line TimeX2=Topen[0]+18000;
Please advise how to get the same result in 5 as it was in 4?
I've encountered a problem with the drawing of levels.
I checked with Print() and got normal calculation results "Example: (GBPUSD,H1) 0.0152 i 1.5911 i 1.59682 i 2013.01.20 22:00:00 i 2013.01.22 09:46:40" but it does not draw these levels. Checking in the terminal via"Object List", they are not there. Please advise what is the problem? Where am I wrong?I'm having trouble drawing the levels.
I checked with Print() and got normal calculation results "Example: (GBPUSD,H1) 0.0152 i 1.5911 i 1.59682 i 2013.01.20 22:00:00 i 2013.01.22 09:46:40" but it does not draw these levels. Checking in the terminal via"Object List", they are not there. Please advise what is the problem? Where am I wrong?