PlaceStopOrderAsync with SL and TP not exact values

Created at 06 Mar 2019, 00:08
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!
KE

ketos.energy

Joined 19.02.2019

PlaceStopOrderAsync with SL and TP not exact values
06 Mar 2019, 00:08


Hi community

I am pretty new to cBot API and I was wondering why my orders do not close at the exact amount of pips as I set when placing the order...

I place a new StopOrder like this

PlaceStopOrderAsync(TradeType.Sell, Symbol, 20000, 1.13, "sellOrder1.13", 5, 20);

or

PlaceLimitOrderAsync(TradeType.Sell, Symbol, 20000, 1.13, "sellOrder1.13", 5, 20);

with StopLossPips=5 and a TakeProfitPips=20.

When I check the history, the positions get closed with a stop loss at not exact pips (e.g. -5.3, -5.2, -5.6) and at take profits like 20.4...
I do not understand the reason for this behavior.

Can somebody enlighten me here?

Thanks so much in advance.

Adrian


@ketos.energy
Replies

PanagiotisCharalampous
06 Mar 2019, 10:10

Hi Adrian,

This is probably caused due to slippage.

Best Regards,

Panagiotis


@PanagiotisCharalampous

ketos.energy
06 Mar 2019, 10:41

Hi Panagiotis

Thanks for your super fast response and link. I really appreciate your service and knowledge.

This makes sense for me. Although, it does happen in over 90% of the closures (see image above), which is a really high number. Is it possible that there is another reason or is there a way to overcome this problem?

Thank you so much.

Adrian


@ketos.energy