[Archive!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass it by. Couldn't go anywhere without you - 2. - page 30
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
Please advise how to set the correct check in the position opening condition - whether there is an open position for this instrument or not. And if there is a position for the symbol (any sell or buy), then the opening does not take place, otherwise the signal to open the position is triggered?
Here is the code (I think it is responsible for opening positions):
Seems to be correct in logic, but it does not work still opens several poses on one tool.
P.S. I am not a programmer. If it is possible to explain in more detail to the dummie.
This is not difficult. It is best to organise 2 subprogrammes that count the orders.
Further, in the code itself, prich:
The MAGIC constant is better declared in user variables. Like this:
Tried
It's not complicated. It is best to organise 2 subprograms that count the orders.
Next, in the code itself, prich:
It is better to declare the MAGIC constant in user variables. Like this:
Thanks, I'll have a look, but it's probably a bit complicated for me.
I've attached an EA file to this post. Have a look at it.
Good morning ! Maybe my question about not optimising is complicated or of no interest ?
There are many possible reasons for this. From the trivial - lack of history to the variant - no profitable options. Although it could be simpler - a bug in the Expert Advisor
Please tell me if the robot creates pending orders.
Commands for pending orders are sent to the server.
Are the pending orders placed in the queue displayed on the terminal?
The same as if I set pending orders manually? Are the open orders at the top, pending orders at the bottom displayed in the terminal?
Please tell me if the robot creates pending orders.
Commands for pending orders are sent to the server.
Are the pending orders placed in the queue displayed on the terminal?
The same as if I set the pending orders manually?
What do you mean by "queued"? The Expert Advisor sends an order to the server to set a pending order. If the parameters of this order are correct, the server sets the pending order and this is immediately displayed in the client terminal. If the Expert Advisor sends an order to place pending orders at a certain step (it is done through a loop), then each new order is processed by the server separately. These orders are placed in queue - Expert Advisor has given an order - server has responded. The Expert Advisor has given an order again and is waiting for the server's reply.
What do orders queued up mean? What do you mean by that?
There are many possible reasons for this. From the trivial one - lack of history to the variant - no profitable options. Although it may be simpler - an error in the Expert Advisor.
I checked - there is a history of minutes from 1999. I checked the checkbox to show all variants (non-profitable ones too). I put even only one MA parameter on optimization, for example from 100 to 110 and all - optimization "dies" - no results, no chart.... Not to mention the inclusion of other parameters.
I have to look at the Expert Advisor. I cannot say anything in this way