You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
It usually occurs in very complex systems with infrequent input, but this is not the case with you.
However let's take a look at your code.
there is a check "AllChecks" for a part of possible errors with one result under any circumstances - false
if false, your EA will not try to make a trade.
It makes sense, but it's clumsy. You can not open such a small lot? Okay, let's open the minimum lot, and so on.
By the way,ENUM_ORDER_TYPE and all its values are not used in mql4, although they kind of are. They are accidentally carried over enumerated constants from mql5.
We can use them, but they are not quite correct.
TopPrice > 80 && LowerPrice >80
you are directly comparing double with int.
Well at least you should have written it like this:
TopPrice > 80.0 && LowerPrice >80.0
because 80 is an int, while 80.0 is a double, you can check it:
Print(440/80) //5
Print(440/80.0) //5.5
how to correctly compare double with double I think you will find.
It is not crucial in this case, but still an error.
this is a very common mistake when posting to the market. you can even frame this post and hang it up )
it usually occurs in very complex systems with infrequent input, but this is not the case with you.
However let's take a look at your code.
there is a check "AllChecks" for a part of possible errors with one result under any circumstances - false
if false, your EA will not try to make a trade.
It makes sense, but it's clumsy. You can not open such a small lot? Okay, let's open the minimum lot, and so on.
By the way,ENUM_ORDER_TYPE and all its values are not used in mql4, although they kind of are. They are accidentally carried over enumerated constants from mql5.
We can use them, but they are not quite correct.
What is the mistake and how can it be avoided in the future?
What is the mistake and how can it be avoided in the future?
do more flexible checks.
I gave the example of the lot, if you can't open the specified one, open the minimum or maximum possible one, rather than just abandoning the idea.
Do more flexible testing.
I gave an example with a lot, if you can't open the specified - open the minimum or maximum possible, rather than just abandoning the idea.
In other words, are you sure that when you and I test our EAs, Metacquotes takes our trades to the real. For your (their) money.
In other words, are you sure that when you and I test our EAs, Metacquotes takes our trades to the real. For your (their) money.
No, I didn't say that at all
So I must have misunderstood you.
obviously)
Everything is tight in the man's code. you can't open a lot I want - I won't. By the way, he is trying to open 0.01 lots
so it turns out that the Expert Advisor in the account with the minimum lot 0.1 (or in the tester at the broker with the minimum lot 0.1) will not open anything.
In this situation, you need the EA to open 0.1 lot, and then everything will be okay.
Folks, has anyone solved this problem withno trading operations when posting to the market. It's just a tantrum. I've already hardcoded and made 100% opening of 1 position when EA starts, but it still returns it to me... I've been struggling with this for 2 weeks now, and previous versions don't pass validation either, even though they've been to market and passed validation before
The computer is an idiot. © M.M. Botvinnik.
So, pretend you're an idiot and try to pass the algorithm from an idiot's point of view and with the parameters set by an idiot. This is exactly the point of view from which the autovalidator fits. Pay attention to the "feedback". Does the Expert Advisor notify you about errors?