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

 
MakarFX #:
Don't you want to get rid of classes?


It has nothing to do with classes. The error must be found in the code. And it doesn't matter whether it has classes or not. At the very least, there is no price normalization after calculations.

 
Konstantin Nikitin #:


It has nothing to do with classes. The error must be found in the code. And it doesn't matter whether it has classes or not. At the very least, there is no price normalization after the calculations.

A class that is not protected from changes from the outside and operates with global variables is already potentially dangerous!

 
Konstantin Nikitin #:


It has nothing to do with classes. The error must be found in the code. And it doesn't matter whether it has classes or not. At the very least, there is no price normalization after calculations.

There is normalisation
 
Сергей Таболин #:

A class that is not externally protected from change, that operates with global variables, is already potentially dangerous!



Agreed 👍

 
Сергей Таболин #:

A class that is not protected from change from the outside, that operates with global variables, is already potentially dangerous!

A crossing with a traffic light also contains a potential danger...

P.S. It's not about anything. Everyone stays with his opinion. So the topic is closed.

 
Konstantin Nikitin #:

A crossing with a traffic light also holds potential dangers...

P.S. The conversation is about nothing. Everyone will stick to his opinion. So the topic is closed.

Speaking of traffic lights ))))

What's the point of a traffic light who ignores its instructions?

And if some jerk got run over just because he was running a red light - then, I'm sorry, but in that case, I just hope his genes are NOT left on earth!!!!

Sorry.

 
MakarFX #:

Artem, I checked the indicator readings and the opening is correct, but visually it shows differently...very strange

Try other days start and compare the readings.

MakarFX, a little later I ran on a larger stat sample - from January to September this year and from 8 candles. In the end, the first order opened as it should and the next ones all the same - all ok. Then for the same period, but already on GBPUSD - the same everything is fine. I don't know why for the first time, at 4 candlesticks, the first order opened 2 candlesticks earlier. This problem didn't occur later.

 
SanAlex #:

This one showed itself today - No errors

SanAlex, yes, looked at the tester for this year's current one, all ok) The results are good, in the near future I will try to run it on a real account

 
artem artem #:

MakarFX, a little later I ran on a larger stat sample - from January to September this year and from 8 candles. In the end, the first order opened as it should and all the following ones too - everything is OK. Then for the same period, but already on GBPUSD - the same everything is fine. I don't know why for the first time, at 4 candlesticks, the first order opened 2 candlesticks earlier. This problem did not occur later.

The lack of history affects the indicator readings at the beginning of the test

 
artem artem #:

SanAlex, yes, looked at the tester for this year's current one, all ok) The results are good, in the near future I will try to run them on a real account

The EA fulfills the tasks perfectly - the most important task is up to us, set it up properly and not interfere in the process manually.

Good luck!

\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

I have decided to test it next week . I found out the time function in your code does not work. I will now add my function to your code.

(You have 0 - 23 should work and should not open positions after 23 but it did.)

Screenshot 2021-10-10 234652

Reason: