For the purpose of reducing the exposure to slippage, is there any difference between using regular stop losses embedded in open orders or using OrderClose() function at the relevant price level?
Which method would you advise?
Thanks.
I would go with regular SL, since it's set on the broker's server not on client terminal. Using so called virtual SL on client you have extra time needed to catch the event & send OrderClose() to broker. Not to mention that you are exposed to higher risk due to additional potential points of failure like hardware or software error of your computer and network problems.
So, I think that, in professionally written codes, coders never use market orders always use pending orders. Can we make such a generalization?
So, I think that, in professionally written codes, coders never use market orders always use pending orders. Can we make such a generalization?
No, we can't. If you want to enter the market based on factors other than fixed price level you need to use market order.
I hope I don't bore you with my newbie questions, thanks a lot.
One more about slippage,
The document says that: "At opening of a market order (OP_SELL or OP_BUY), only the latest prices of Bid (for selling) or Ask (for buying) can be used as open price."
Is there any function of slippage when sending market orders?
It seems to me that there is not.
I hope I don't bore you with my newbie questions, thanks a lot.
One more about slippage,
The document says that: "At opening of a market order (OP_SELL or OP_BUY), only the latest prices of Bid (for selling) or Ask (for buying) can be used as open price."
Is there any function of slippage when sending market orders?
It seems to me that there is not.
- docs.mql4.com
For understanding better, I needed to get some information about execution types.
Mostly clear, I think.
Just would like to ask one more about pending orders:
My broker uses market execution for market orders.
When the pending orders (as well as stops and take profits) are triggered, does the broker use the market execution as well?
For the purpose of reducing the exposure to slippage, is there any difference between using regular stop losses embedded in open orders or using OrderClose() function at the relevant price level?
Which method would you advise?
Thanks.
How about using a function like the following at every tick for closing opened orders at their stop losses?
A newbie, needs confirmation from experienced coders.
Thanks.
void Close_Order() { for(int i = 1; i <= OrdersTotal(); i++) { OrderSelect(i, SELECT_BY_POS); if(OrderType() == OP_SELL || OrderType() == OP_BUY) { OrderClose(OrderTicket(), OrderLots(), OrderStopLoss(), 0); } } }
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
For the purpose of reducing the exposure to slippage, is there any difference between using regular stop losses embedded in open orders or using OrderClose() function at the relevant price level?
Which method would you advise?
Thanks.