A sub-workshop to fill in the FAQ (frequently asked questions). Let's help comrades! - page 7

 
Addendum:
alsu:

I promised, I'll start with the simplest one)

Question: DoesMQL do arithmetic operations incorrectly? Why does dividing one number by another result in 0?

Answer:

Most likely......

...............

Solution to the problem:

Fix the data type in the variable declaration to one that corresponds to the operations to be used:

double a,b;

... or use an expression type conversion of the divisible:

с = (double)a/b;
 

Let me add my own answer to the question of how to make money with forex:)

 
MetaDriver:
Addava:

... or use a divisible expression type conversion:

:)) here MQL4
 
sergeev:
:)) here MQL4

:)

OK, that's fine:

с = 1.0*a/b;

Shit, I was surprised to find that type ghosting really isn't in the quad. And how did I write on it....?

 

Please include it in the FAG.

I'm so ancient and I've come across this kind of thing recently.

1) Turn off a running EA when taking a report, and when testing!!! Otherwise, the Expert Advisor will start to open orders not on the conditions, after withdrawal of the report or the test.

2) During testing, if the Expert Advisor uses higher TFs, you should first test it from a date a month ago, and only then test on the interval, on which you are testing.

 

Martingeil:

1) Turn off a running EA when taking a report, and when testing!!! Otherwise the Expert Advisor will start to open orders not according to the conditions, after withdrawal of the report or test.

This is something new. provide details with a log of the glitch detected.


2) When testing, if upper TFs are used in the Expert Advisor, you should first test it with the date a month back, and only then test on the interval you are testing.

ok. this recommendation has been added.
 
sergeev:

this is new. provide details with a log of the glitch detected.


ok. this recommendation has been added.

First you have to check it, understand what it's caused by and why.

 
Integer:

First you have to check it, understand what it's for and why.

I have no doubts about the second point, there is one. This is a problem of the tester, it generates few bars for itself, that is why there is no high TF when testing on a low one. That is why we should start a bit earlier to have the bar formed.

But I do not understand the first one.
 
sergeev:
I have no doubts about the second point, there is one. This is a problem of the tester, it generates few bars for itself, that is why the major TF is absent during testing on a minor one. That is why we should start a bit earlier for the bar to be formed.

But with the first one I don't understand...

I do.

On the first one. In testing, it can if the global variables are used with the same names as in the account. That's something with the report.

 
Integer:

I do.

Yes. I forgot to add that this is on the condition that the main story is not loaded by the required high TF.