Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 118

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
I have something on a simple point, a headache. There is a function to search for orders.
t - counter of all orders.
p - counter of pending orders.
I call it from the start:
In fact, when we open it, even when there are no orders, we see this (even when there are no orders, it prints as if there are...):
How is this possible?
Did you ever think that the type of order could also be more than five? Specifically six. This is a non-trading change in the deposit.
There you go...
Did you ever think that the type of order could also be more than five? Specifically six. This is a non-trading change in the deposit.
No. That's the first I've heard of it. Where does it say that?
deposit = type 6
Hmm. Order type = deposit!? What is that?
There you go...
Did you ever think that the type of order could also be more than five? Specifically six. This is a non-trading change in the deposit.
And why 6, because the size or number of orders can be set independently in the Expert Advisor.
Hmm. Order type = deposit!? What is this?
all withdrawals and deposits go under this number
And why 6, because the size or number of orders can be written into the EA.
What are we talking about? We are not talking about the number of orders, but about the type of order. So: an order of type 6 is a non-trading modification of the deposit.
No. That's the first I've heard of it. Where does it say that?
This is undocumented data.
All withdrawals and deposits go under that number.
Hmm. And how can this number affect the collection of order statistics?
This is undocumented data.
That's great! The most interesting thing is that someone knows about it, oddly enough. How could anyone have guessed that?
What are we talking about? It's not about the number of orders, it's about the type of order. So: an order of type 6 is a non-trading change of deposit.
If an owl is tested in the demo, how can this order be accounted for? I.e. the balance, which is initially given on the demo - it will be that... the sought-after ONE? And in the real - this is what we have withdrawn and deposited, right?
This should work, I haven't tested it myself, as the terminal is busy optimizing another EA so far
Hello!
I have tried to paste your code into the template from the tutorial. I have to open only one position but the template has only one position.
The ticket variable has another name, as the template already has one and made it static, so the criterion for withdrawal would receive data from it, if the position remains on the next day.
Everything is good, but a looping problem has appeared. For example, in the Strategy Tester, the Expert Advisor exits a position at Take Profit or close sell and the criterion of entering is still active, so it turns out that the Expert Advisor constantly opens and closes a position.
This problem was solved by adding a static datetime variable t earlier but now
sell stops working.
It works but it loops:
What may be the problem? I tried everything I could think of, but I am not so good at mql .
I am attaching the Expert Advisor, it is not possible to place all the text.
Hmm. And how this number may influence the collection of order statistics?
That's great! The most interesting thing is that someone knows about it, oddly enough. How could anyone have guessed that?
If an owl is tested in the demo, how can this order be accounted for? I.e. the balance, which is initially given on the demo - it will be that... the sought-after ONE? And what we have in the real market is what we have withdrawn and deposited, right?
Perhaps, it is possible to prescribe somehow the withdrawal of part of the deposit, when one closes with a good profit, or the filling when one has hit the loss. I must look it up, maybe there is such a thing, eh?