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
Oh, shaitan... Passed validation and now
no trading operations
no longer an error.
P.S. It was a random shot. Next test is the same thing again
There's no error here, I don't understand what's going on at all. I put a crutch (division by zero) before the trade function:
It works:
I take it out, it gives me the same
No trading operations.
I don't understand what prevents validator from OrderSend(). After all, if it reaches him, there must be billing errors (although I've fixed them all) 130, 131, 134, ..., but not"no trading operations". I've only got to put a pending order somewhere far away in OnInit() to prevent it from triggering.
And what is the sense in such a crutch if the condition under which a position must be executed does not enter the code?
Why is there no input?! Look carefully Alexey. There is a crutch just before OrderSend.
Right. If OrderSend is not executed, it means that code execution does not reach it for some reason. And no matter what you put before it in the condition block, there is no input and no execution, not even division by zero.
Wait, I don't understand. If operator 1 (division by zero) is executed, then the next one is the if operator. And that means checking its condition. To check the condition, the OrderSend function must be executed, which means that it is next in line after division by zero.
But never mind. I have changed the code for the sake of purity of the experiment:
The result is the same. The result with the crutch is an error of division by zero. Without the crutch, the result is shown above: no trading operations.
Wait, I don't understand. If operator 1 (division by zero) is executed, then the next one is the if operator. And that means checking its condition. To check the condition, the OrderSend function must be executed, which means that it is next in line after division by zero.
But never mind. I have changed the code for the sake of purity of the experiment:
The result is the same. The result with the crutch is an error of division by zero. The result is shown above without it: no trading operations.
You should not have used a picture to paste the code. It is impossible to read it at all. And the problem is not in this code fragment. The problem is that some condition is not fulfilled at some input parameters and there is no notification.
Why doesn't it come in?!
Why are you trying to write worse for the market than for yourself?
It's simple - before sending an order, see "is it even executable?"
check the limits (you said that), check the funds and margin (you don't have that), see if there is a link and if the trade is allowed.
(option) if there were heavy calculations, it is not a sin to RefreshRates before reading Bid Ask
For your own sake you will do all these checks. Why not now?
You think I don't check. The lot size is checked in a separate function
Limits are not needed here, because Stop Loss and Take Profit are equal to zero at trade opening.RefreshRates() updates data at lot calculation. Of course, there is no check of connection, etc. before each entry, but that's not the point. If OrderSend sent a request, there would be a specific error: 130, 131, etc. But what I have is.
Not trying to send an order to open at all. Even in the last test, when I set a check position in the OnInit() function.
You should not have pasted the code in an image. It is impossible to read it. The problem is not in this code fragment. The problem is that some condition is not fulfilled in some input parameters and there is no notification of this fact.
It may be. But I have already double-checked everything. I don't know where to dig next.
You think I don't check. The lot size is checked in a separate function
Limits are not needed here, because Stop Loss and Take Profit are equal to zero at trade opening.RefreshRates() updates data when calculating lot size. Of course, there is no check of connection, etc. before each entry, but that's not the point. If OrderSend sent a request, there would be a specific error: 130, 131, etc. But what I have is.
Not trying to send an order to open at all. Even in the last test, when I set a check position in the OnInit() function.
It is possible. But I have already double-checked everything. I do not know where to go next.
Look at how other orders have been implemented in the EA. I don't think the Expert Advisor only opens
at the opening ticket<0 has been set - look at the other logic, how it reacts to this in reality