Questions from Beginners MQL5 MT5 MetaTrader 5 - page 547

 
Boris:
There are a lot of examples in the code base! And first of all you have to adjust your logic in everything you do! Why, for example, to represent Magik in extern's, will you optimize the value of Magik to increase profitability? ;)

Which Magik are we talking about?

And in the code, I take it it's the numbers with a minus that cause the error?

 
edutak:

And in the code, I take it it's the numbers with a minus that cause the error?

Yes.

You can write it like this: a_200 = b; But a-200 = b; - you will get an error.

 
Alexey Kozitsyn:

Yes.

You can write: a_200 = b; But a-200 = b; - you will get an error.

Thank you.
 
edutak:

Which Magick are we talking about?

Yours!
 
Alexey Kozitsyn:

Yes.

You can write: a_200 = b; But a-200 = b; - you will get an error.

But: b = a-200; will not give an error.
 
Boris:
But: b = a-200; will not give an error.
Here you just need to understand that the equal sign is not an "equal" as in mathematics, but an assignment operation. That is, the left part (variable) is assigned to the value of the right part (expression or variable).
 
Please tell me.

If the compiler gives no errors, but the orders do not open correctly, all at once. It could be because of faulty logic of the algorithm.

To be more precise, if you disable the order closing block, the orders open correctly; if you enable the order closing block, the orders open at once on every tick.

 
edutak:
Please tell me.

If the compiler gives no errors, but the orders do not open correctly, all at once. It could be because of faulty logic of the algorithm.

To be more precise, if you disable the order closing block, the orders open correctly; if you enable the order closing block, the orders open at once on every tick.

Without the code you will not be helped.
 
edutak:
Please tell me.

If the compiler gives no errors, but the orders do not open correctly, all at once. It could be because of faulty logic of the algorithm.

To be more exact, if you disable the order closing block, the orders open correctly; if you enable the order closing block, the orders open at once on every tick.

Errors are of three types.

Syntax errors - they are detected at the compilation stage.

Logical - they are detected during debugging and testing.

Runtime - run-time errors are usually caused by incorrect data, for example,division by zero or array overrun.

 
Vladislav Andruschenko:
You will not get any help without the code.

I'd hate to show the code, as the first version proved to be very survivable. It survived for 10 years without optimisation. Now I want to make it a bit more complex and profitable.

The code is very simple.

Still, orders may be opened on every tick due to errors in the logic.

Reason: