Questions from Beginners MQL5 MT5 MetaTrader 5 - page 554

 
Karputov Vladimir:
Do not engage in verbiage -of course calling OnCalculate implies calling it by the terminal itself, because

Well you didn't have to call OnCalculate yourself. I do it regularly. And, as it turns out, I'm not the only one.

In short, the same code in MT4 works without any problems, in MT5 it crashes. Will they correct the behaviour of 5?

 
comp:

Well you didn't have to call OnCalculate yourself. I do it regularly. And, as it turns out, I'm not the only one.

In short, the same code in MT4 works without any problems, in MT5 it crashes. Will they fix the behaviour of 5?

You can work in the indicator only after the first call of OnCalculate - because it is OnCalculate that guarantees the preparation of the environment of the indicator.
 
Karputov Vladimir:
You can only work in the indicator after the first run in OnCalculate - as it is OnCalculate that guarantees the preparation of the indicator environment.
The code above shows that this rule only works in MT4. In MT5 it is different.
 
comp:
The code above shows that this rule only works in MT4. This is different in MT5.
Once again: only the first entry in OnCalculate guarantees environment preparation.
 
Karputov Vladimir:
Once again: only the first entry into OnCalculate guarantees the preparation of the environment.

You are trying to provoke me into an argument, which falls under the "arguing with a moderator" rule and is punishable by a ban. I have no intention of arguing with you.

Unlike you, I have provided code that fully confirms what I am saying. Anyone who wants to understand, can run the code and make sure my words are true.

 
Maria Baburina:

Hello, ran into this problem.

There is a condition in the program: if a variable (in which profit of certain orders is calculated) is smaller than the expression from several other variables, several functions will be executed next.

I will not describe at once exactly what and how it is calculated as it would be too much. Maybe, the answer will be very simple because I do not know it:)

So, when executing the program this condition turns out to be true, when in fact the first variable is much larger than the other one (for example, displayed in the tester values - 146.3412 and 0.41).

All variables in this condition are of type double and separately are calculated correctly.

Can you tell me what it may be related to?

What is the problem?
 
Vladimir Zubov:
What is the problem?
On specific numbers it says 146.3412 < 0.41

I'll write a separate code with this error to check it
 
comp:

You are trying to provoke me into an argument, which falls under the"arguing with a moderator" rule and is punishable by a ban. I have no intention of arguing with you.

Unlike you, I have provided code that fully confirms what I am saying. Anyone who wants to understand can run the code and see if what I said is true.

This argument should not be considered an argument with a moderator, for the simple reason that Vladimir is NOT performing the function of a moderator in the current dialogue. It is merely an argument between two programmers.
 
Alexey Viktorov:
This argument should not be seen as an argument with a moderator, for the simple reason that Vladimir is NOT performing the function of a moderator in the current dialogue. It is merely an argument between two programmers.
However, I have been repeatedly banned for trying to defend my technical points when talking to moderators. And accused of unethical behaviour - "arguing with a moderator". I do not intend to step on the same rake.
 
comp:
However, I have been repeatedly banned for trying to defend my technical points when talking to moderators. And accused of unethical behaviour - "arguing with a moderator". I do not intend to step on the same rake.

I read those arguments. But it wasn't an argument, it was just an unwillingness to understand explanations and attempts to prove the fault of the terminal. Your words were not backed up by anything. You are too lazy to make screenshots and explain your thoughts clearly.

Don't try to prove developers are stupider than you and there will be no reprisals.

If MT4 does not behave like MT5, it does not mean that MT5 does not behave correctly.