I find myself with the same issue and am in the middle of trying various approaches.
The only way I have found so far is to change the pending order to a market order
(after RefreshRates) and resend it. You can modify the open price of a pending
order but then you are caught in the no-fly zone (error 130 meaning your price
is too close to the market and you must use a market order). There are brokers
that advertise 1 pip no-fly zones but I don't know how reliable they are or what
the fine print really says you can do.
Scott
when market is highly volatile, it happens that a pending order with 0 slippage
is not opened because the rate jump over the OrderOpenPrice of this pending order.
Which trading function has to be used by the Expert to open this order at the new
rate ?
i.e. : rate at 1.2600
pending order sell limit at 1.2605
rate gap to 1.2612 without touching the exact rate 1.2605
how to open the sell order at this new rate 1.2612 ?
is it necessary to delete the pending order SELL_LIMIT at 1.2605 and do a sendorder
SELL at 1.2612 ?
or can the pending order SELL_LIMIT be executed instantly ? how ?
thanks
ScottB wrote:
I find myself with the same issue and am in the middle of trying various approaches.
The only way I have found so far is to change the pending order to a market order
(after RefreshRates) and resend it. You can modify the open price of a pending
order but then you are caught in the no-fly zone (error 130 meaning your price
is too close to the market and you must use a market order). There are brokers
that advertise 1 pip no-fly zones but I don't know how reliable they are or what
the fine print really says you can do.
Scott
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
when market is highly volatile, it happens that a pending order with 0 slippage is not opened because the rate jump over the OrderOpenPrice of this pending order.
Which trading function has to be used by the Expert to open this order at the new rate ?
i.e. : rate at 1.2600
pending order sell limit at 1.2605
rate gap to 1.2612 without touching the exact rate 1.2605
how to open the sell order at this new rate 1.2612 ?
is it necessary to delete the pending order SELL_LIMIT at 1.2605 and do a sendorder SELL at 1.2612 ?
or can the pending order SELL_LIMIT be executed instantly ? how ?
thanks