Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 1813

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
Rostislav!
And this "current" can be permanently inserted into the mq4 code. In order not to set the required TF each time. I have not succeeded.
Rostislav!
And this "current" can be permanently inserted into the mq4 code. Not to set the required TF each time. It did not work for me.
This line in the beginning of code
Replace it with
This line at the beginning of the code
replace it with...
Thank you very much, Rostislav!
Everything worked!
Good luck!
Also, tell me how MakarFH became Rostislav.
Where is there any consonance... anything at all?
Also, tell me how MakarFH became Rostislav.
Where is there even a consonance ... something-there.
decompile)
Hi all. Can you advise me please:
I'm trying to calculate a crossover on a standard MACD of a signal line and a histogram. The idea is this: on each new bar we take the two previous candles and get the indicator values on each of them. If the MACD value on the second candle is greater than the signal value and the MACD value on the first candle is already below the signal and all values are above zero, it means there is a crossover upwards and vice versa.
But, at the moment of getting the value it becomes somehow huge. And only one - the signal line of the second candle. It can be 8 to what degree, 4.5, 7, etc. When the next bar appears, the value of the signal line of the second bar from the new bar can already be normal. All the others turn out to be correct. And in the data window, the value is also correct. I cannot understand why. What am I doing wrong?
I have a feeling that this is about a variable double. Because the value in the data window is 0,000081, but it turns out 8,1....., the same thing I noticed with another value - in the data window 0,000071, but in the variable 7,1..... But they are all defined as double variables.
But, at the moment of getting the value it becomes somehow huge. And only one - the signal line of the second candle. It can be 8 to what degree, 4.5, 7, etc. When the next bar appears, the value of the signal line of the second bar from the new bar can already be normal. All the others turn out to be correct. And in the data window, the value is also correct. I cannot understand why. What am I doing wrong?
I have a feeling that this is about a variable double. Because the value in the data window is 0,000081, but it turns out 8,1....., the same thing I noticed with another value - in the data window 0,000071, but in the variable 7,1..... But they are all defined as double variables.
There's not 8 in the comment, there's a continuation.
There's not 8 in the commentary, but there's a sequel.
Thank you. That shows it correctly. Stupid mistake, of course. But I still wonder why all the other values are displayed normally and only one is crooked.
Thank you. That's the right way to do it. Stupid error, of course. But I still wonder why all other values are displayed normally and only one is crooked.
It is not crooked, it is correct at machine level, you see there is "e-08" at the end.
For example, the number 1e-05 is not an error but0.00001.
You need to use DoubleToString to see what we are used to and the program will work correctly anyway
Read
It is not crooked, it is correct at the machine level, see there is an "e-08" at the end.
For example, the number 1e-05 is not an error, it is0.00001.
To see what we are used to, you need to use DoubleToString and the program will work correctly anyway
Read
Thank you again. I will read it.