ctrader advanced take profit buggy
ctrader advanced take profit buggy
05 Nov 2018, 21:25
Hello, I want to point out 2 issues:
1. there is a clear bug in the current advanced take profit.
If my current position is at -20 pips, I cannot set ATP1 less than 20 pips!
Issue 2:
Additionally there is another behaviour which is somewhere between a bug and just plain not intuitive. Assume
1. open a position 1 lot
2. The position goes down 100 pips
3 I double the position to 2 lots so I am now -50 pips
4. I now set the advance profit to take 1 lot of profit at 1 pip and ATP 2 to take 1 lot of profit at 10pips
Because of the way things are being calculated as soon as ATP1 is hit, ATP2 will also be hit! because when ATP1 is hit the system actually takes a loss on the 1st lot and gives all the profit to the remaining position (instead of averaging over the 2 which would make sense)
I have seen many positions being closed out unfortunately when I would like to have let the remaining winning position profit ride. I now understand the behaviour and work around it, but this is not easy to work around and the behaviour is not intuitive to newcomers.
Regards
Replies
equantfx
07 Nov 2018, 10:24
( Updated at: 21 Dec 2023, 09:20 )
Dear Panagiotis,
I was able to reproduce issue 2 on a demo account the way I see it working (please correct me if something is wrong in my understanding) I really need to understand this as this situation is standard for anyone who scales into a position or uses grid/martingale. If there is a bug here it should be fixed urgently as this is actually quite common. I would invite you to reproduce on your side. It requires a bit of patience to allow positions to move into a loss , double and then move into profit. HEre are the details.
In my example :
1. open 0.01 EURUSD
2. waitied for it to drop -12 pips
3. doubled the position to 0.02
4. waited for the position to move to a very small profit about 3pips in my case
5. partially closed 0.01 lots and then for illustration, IMMEDIATELY partially closed 0.01 (Which closes the entire position).
You will see in the screenshot below that the entry price for the 2 partially closed positions is different! Even though as you say when I doubled the position my entry price was adjusted to the average price. When I partially closed the position different prices were used to compute the pips. This has no effect on the $result, but the impact on ATP is huge. when I partially closed the dirst position, my pips for the total position was showing about 3pips. But we clearly see that this has been split into a 7.4 pips gain and a 0.4 pip gain. In fact when I close the first position, the new pips reading was immeadiately 7.4 pips. However If I had set ATP1 at 3 pips, and ATP2 at 5pips, my ATP2 would have been triggered at the same time at ATP1 which is not intuitive. Please let me know if I need to clarify something, I realize analysis is a bit complicated.
AGain there is no impact on the $ situation at the end, but this situation is important.
@equantfx
equantfx
22 Nov 2018, 13:23
Hi Panagiotis,
I would really appreciate feedback on my screenshot confirmation of the bug. I can easily reproduce this. This issue has consequences on ATP, SL2BE and also people who are programming bots which depend on the entry price being accurate. Grid, Martingale, hedging may all be affected. I am surprised no one else has seen this, however I only understood what was happening recently. I have been using cTrader actively for 3 years so I know the platform well.
For others who may be interested, as a work around, I now open multiple positions. However this has a serious downside, that there are way too many lines on my graphs!
Regards,
@equantfx
PanagiotisCharalampous
22 Nov 2018, 14:12
Hi equantfx,
I investigated this issue and this behavior is by design. Position entry price is calculated based on open deals composing the position. Complex positions (the ones consisted of more than one deals) are partially closed based on the FIFO rule, therefore if partial closing closes entirely one the oldest deals, this will cause the recalculation of the entry price. For now we do not have any plans to change this behavior.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
06 Nov 2018, 09:46
Hi equantfx,
Thanks for reporting issue 1. We will have a look into it and fix it.
Regarding issue 2, this is not how things work. Position entry price changes when position size increases but not when it partially closes. Therefore when ATP1 1 is hit, the profitability of the position in terms of pips will not be affected and ATP2 will still be triggered 10 pips above the entry price.
Best Regards,
Panagiotis
@PanagiotisCharalampous