Questions from Beginners MQL5 MT5 MetaTrader 5 - page 107

 

In such a case, there is little information to understand. As for your picture, this may be due to an internal error in the calculation algorithm. When, for example, Bollinger lines should be calculated on 20 periods, but during averaging the code divides the sum of the last twenty values not by 20, but by 19 or 18 (conditionally).

 
Yedelkin:

In such a case, there is little information to understand. As for your picture, this may be due to an internal error in the calculation algorithm. When, for example, Bollinger lines should be calculated on 20 periods, but during averaging the code divides the sum of the last twenty values not by 20, but by 19 or 18 (conditionally).

Strange glitch - I switch to M5 window when analysing, and then I return to M15 and everything is as it should be.
 
Yedelkin:

Unlikely. Rounding price values from "three to two digits" has no effect on the occurrence of a gap between prices and Bollinger Bands.

But a part of this code makes you doubt that the rest of the code is correct. Please see lines marked in the background:

The author of the code tries to compare the value of the uninitialized variable Old_Time on every tick. This crap means that the code cannot be trusted in principle.

Yedelkin:

I don't think so. Rounding price values from "three to two digits" has no effect on the gap between prices and Bollinger Bands.

But a part of this code makes you doubt that the rest of the code is correct. Please see lines marked in the background:

The author of the code tries to compare the value of the uninitialized variable Old_Time on every tick. This crap means that the code cannot be trusted at all.

Everything is OK now, when I have removed indicators assigned for other periods (M5, M30, H1)
 
Lester: It all fell into place when I removed the indicators assigned to other periods (M5, M30, H1)
That's good :)
 

Is it possible to add data to the file by column????

 
dentraf:

Is it possible to add data to the file by column????

there is a possibility.
 
sergeev:
there is a possibility.
I.e. there is a column of data, the file is closed, how can I add another column so that the first column remains. How to implement this? Please advise?
 
dentraf:
i.e. there is a column of data, the file is closed, how to add another column so that the first column remains. How to implement this? suggestion?
open -> read -> add -> write -> close.
 
sergeev:
open -> read -> add -> write -> close.
via intermediate array? here "read -> add"
 
dentraf:
Through an intermediate array? That's where "read -> add" comes in.

Array, string, whatever. There has to be an intermediate buffer.

there's no other way to cram in the un-cramped. :)

Reason: