[ARCHIVE] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 3. - page 287
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
on the first non-buy order you will flood the account with buy orders.
Thank you! Found another mistake!
Thank you! Found another error!
Mm-hmm.
but the previous one hasn't been fixed.
You can't put an order opening immediately into a loop. You have to do a full loop on the orders first and find out exactly whether there is a Buy or not.
And only after that do you put a Buy, after that cycle.
Mm-hmm.
but the previous one wasn't fixed.
You can't put an order opening immediately into a loop. You must first do a full loop on the orders and find out exactly whether there is a Buy or a No.
And only after that should you place a Buy if it is not there yet.
Right, I just took a piece from my programme posti without re-doing it. I'll do it now - five minutes...
Right, I just took a piece from my programme posti without redoing it. I'll do it now - five minutes...
Is that right now?
What's the point of this pause?
Why the pause?
The order is not executed immediately. Without a pause on the next tick, the order may not be opened yet, and the program will send another command to open it. In the MT5 tester, you can already enter the execution delay.
Is it correct now?
Have you tried making it a separate function to search for the presence/absence of items?
For example:
Magic - magic number of EA (set in settings, or generated by EA automatically). Then to check the absence of position Buy by current symbol should be written:
Note - not just a command to open a Buy order, but a full function with handling all order opening parameters and errors returned by the server.
However, for a tester, we can do without checking the entered parameters for valid values...
Have you tried making it a separate function to search for the presence/absence of items?
For example:
Then to check for absence of Buy position by current symbol should be written:
Note - not just a command to open a Buy order, but a full function with processing all parameters of the order opening and errors returned by the server.
However, the tester may do without checking the entered parameters for permissible values...
In the first post I gave the functions, kolyango wasn't happy with that. Also, I don't like working with magicians.