-
if(OrderType()==OP_BUY)
A pending order is not an OP_BUY. That is an open order.
-
There is no need to create pending orders in code.
-
The pending has the slight advantage, A) you are closer to the top of the queue (filled quicker), B) there's no round trip network delay (filled quicker.)
Don't worry about it unless you're scalping M1 or trading news.
-
Humans can't watch the screen 24/7, so they use pending orders; EAs can, so no need for pending orders, have it wait until the market reaches the trigger price and just open an order.
-
-
A pending order is not an OP_BUY. That is an open order.
-
There is no need to create pending orders in code.
-
The pending has the slight advantage, A) you are closer to the top of the queue (filled quicker), B) there's no round trip network delay (filled quicker.)
Don't worry about it unless you're scalping M1 or trading news.
-
Humans can't watch the screen 24/7, so they use pending orders; EAs can, so no need for pending orders, have it wait until the market reaches the trigger price and just open an order.
-
1. I'm fully aware of that, I want my trail stop to trail in profit as soon as price hits my stops (buy stop & sell stop), all the time not SOMETIMES.
2. I want to use my pending orders for a strategy that I have and it requires pending orders.

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi all
Below the code I have attached a trailing stop code that only trails when its in profit only. For positions trades it trails ALL the Time which works perfectly fine, as for pending orders not all the time. Sometimes it will trail and sometimes it won't. I have tried using get last error code and I get nothing. Please help if you know why I encounter this problem for pending orders ONLY?