Closing positions with market order subject to max slippage

Created at 16 May 2022, 11:02
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
HA

haohan51

Joined 12.01.2021

Closing positions with market order subject to max slippage
16 May 2022, 11:02


Hello,

I am looking to close existing positions in cAlgo but with a limit to the slippage.

I can see there is an equivalent method for opening positions with "ExecuteMarketRangeOrder" - but it there one for closing a position?

Alternatively, I wanted to replicate this by placing a TakeProfit on the position that is deliberately already past the price. I.e. if I am long, and current bid price is 1.2000, I want to place a TP @ 1.1000. This should theoretically get me out of the position at 1.1000 worst case. But cAlgo does not let me place TP below current bid (in the long case)....

All in all, is there a way to close a position subject to a max slippage?

Thank you


@haohan51
Replies

amusleh
16 May 2022, 11:09

Hi,

For now there is no such feature in cTrader automate API, you can open a thread under suggestions section for this feature.


@amusleh

haohan51
16 May 2022, 20:34

RE:

amusleh said:

Hi,

For now there is no such feature in cTrader automate API, you can open a thread under suggestions section for this feature.

Thank you for your reply - I've created this Suggestion.

Please could anyone interested help with a vote on this:

 


@haohan51

Clark22
31 May 2024, 11:05 ( Updated at: 31 May 2024, 11:52 )

RE: RE:

haohan51 said: 

amusleh said:

Hi,

For now there is no such feature in cTrader automate API, you can open a thread under suggestions section for this feature.

Thank you for your reply - I've created this Suggestion.

Please could anyone interested help with a vote on this:

https://ctrader.com/forum/suggestions/38094

 

If you want to exit trade at a price below current then that's a Stop Loss. As for avoiding slippage on closing a position, wouldn't that be lovely?! 🤣


@Clark22

haohan51
01 Jun 2024, 10:52 ( Updated at: 02 Jun 2024, 11:13 )

RE: RE: RE:

Clark22 said: 

haohan51 said: 

amusleh said:

Hi,

For now there is no such feature in cTrader automate API, you can open a thread under suggestions section for this feature.

Thank you for your reply - I've created this Suggestion.

Please could anyone interested help with a vote on this:

https://ctrader.com/forum/suggestions/38094

 

If you want to exit trade at a price below current then that's a Stop Loss. As for avoiding slippage on closing a position, wouldn't that be lovely?! 🤣

Hello, thanks for feedback, but for the benefit of any future reader, I have to push back where I think appropriate.

On cTrader, a Stop Loss is a Market Order and and a Take Profit is a Limit Order (there are some subtleties between different platforms, MT5 is different to cTrader). So no matter where current price is relative to the order price, they are fundamentally different. So this point alone means the statement “If you want to exit trade at a price below current then that's a Stop Loss” cannot be true. I strongly recommend to the reader to go through the illustration in my original post and contrast that to a Stop Loss order.

On the point about “avoiding slippage” - it's worth clarifying that it is possible to avoid slippage but it comes at a cost. The cost being the risk of not getting out at all. So one can absolutely avoid slippage in this sense. In fact, the Take Profit you have (on cTrader) for any position is a Limit Order - which by definition fills at the order price or better. So you shouldn't be getting negatively slipped in a Take Profit. But it's not a free lunch. The danger is that the price never fully crosses or there isn't enough liquidity to get you out at that price/better.


@haohan51