Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 1252
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
Good day to you all!
I am testing this algorithm in MT4 tester using mql4. I need Print() function to output the Bid price in log with 5 (five) decimal places. But it would only print 4 (four) decimal places. Please tell me how to fix my mistake, if it exists.
Here is my code.
}
At the same time, if I print using Print() the opening, and closing price of the order( by SL and TP), then Print() prints the price with 5(five) digits.
Thank you all for your help.
DoubleToString(), not NormalizeDouble()
I told you I didn't like my decision (((
I'm too lazy to write again.
Google "array find repetitions" - I think you'll find something
DoubleToString(), not NormalizeDouble()
Thank you very much for your informative support.
use TimeToStruct()
https://www.mql5.com/ru/docs/dateandtime/timetostruct
use TimeToStruct()
https://www.mql5.com/ru/docs/dateandtime/timetostruct
Yes I have it on mt4
it works in MT4
it works in MT4
I don't understand how I can get the value of minute whenposition was opened from this struct which returns trumpet...
datetime o_open = OrderOpenTime();
MqlDateTime dt_struct;
TimeToStruct( o_open, dt_struct;)
int min = dt_struct.min;
If you can help me understand what's wrong when trying to read indicator buffer data.
Here is the code from the EA:
In real and in tests searching for the last value through the function works, but the test is catastrophically slow (half year test stretches for several days).
So I decided to use swap on test and save last value to global variable - the Expert Advisor stopped seeing buffer data. And even though empty buffers are 0, for some reason EA's variables take EMPTY_VALUE values and do not change.
But when I put the cursor over the buffer line in the data window, two values appear in the tooltip, and the first value is 0, for example Value 5; 0.0000; 0.8855.
I can't find it out, though I poke around in the indicator code. The search in Internet and documentation didn't help. May someone please advise why the test is so slow when I try to use this indicator?
Please help me!