Closing part of a position in backtesting

Created at 06 Sep 2024, 11:46
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!
DA

da.weber92

Joined 26.06.2024

Closing part of a position in backtesting
06 Sep 2024, 11:46


I was wondering if it is possible that you can close parts of a position in backtesting, like it is in live trading.

For example, being short 1 lot and closing 0.5 of the position. I looked everywhere, but did not find the option to do this. So I assume it is not possible right now.


@da.weber92
Replies

firemyst
07 Sep 2024, 01:13

If you wrote your own bot, then you do it in your code by modifying the position and reducing the volume of your position when your criteria are met.


@firemyst

da.weber92
07 Sep 2024, 18:28

RE: Closing part of a position in backtesting

firemyst said: 

If you wrote your own bot, then you do it in your code by modifying the position and reducing the volume of your position when your criteria are met.

Sorry for being unprecise, but I meant manual backtesting without a bot or even indicators. Just looking at the chart and using a little bit of intuition.

 

I am using hedging for some time now and you can get out of bad trades by partly closing positions quite well. But I can not do that in replay mode or I did not find the option to do this.


@da.weber92

firemyst
08 Sep 2024, 09:10

RE: RE: Closing part of a position in backtesting

da.weber92 said: 

firemyst said: 

If you wrote your own bot, then you do it in your code by modifying the position and reducing the volume of your position when your criteria are met.

Sorry for being unprecise, but I meant manual backtesting without a bot or even indicators. Just looking at the chart and using a little bit of intuition.

 

I am using hedging for some time now and you can get out of bad trades by partly closing positions quite well. But I can not do that in replay mode or I did not find the option to do this.

Just double click on your order in the order window and the modify order window comes up.

Reduce the volume of your position and click to update your order.


@firemyst

da.weber92
08 Sep 2024, 12:46

RE: RE: RE: Closing part of a position in backtesting

firemyst said: 

da.weber92 said: 

firemyst said: 

If you wrote your own bot, then you do it in your code by modifying the position and reducing the volume of your position when your criteria are met.

Sorry for being unprecise, but I meant manual backtesting without a bot or even indicators. Just looking at the chart and using a little bit of intuition.

 

I am using hedging for some time now and you can get out of bad trades by partly closing positions quite well. But I can not do that in replay mode or I did not find the option to do this.

Just double click on your order in the order window and the modify order window comes up.

Reduce the volume of your position and click to update your order.

I tried doing that before because I know this works in live trading, but in replay mode nothing happens when I double click. I am afraid that it is just not implemented yet :/


@da.weber92

PanagiotisCharalampous
09 Sep 2024, 06:06

RE: RE: RE: RE: Closing part of a position in backtesting

da.weber92 said: 

firemyst said: 

da.weber92 said: 

firemyst said: 

If you wrote your own bot, then you do it in your code by modifying the position and reducing the volume of your position when your criteria are met.

Sorry for being unprecise, but I meant manual backtesting without a bot or even indicators. Just looking at the chart and using a little bit of intuition.

 

I am using hedging for some time now and you can get out of bad trades by partly closing positions quite well. But I can not do that in replay mode or I did not find the option to do this.

Just double click on your order in the order window and the modify order window comes up.

Reduce the volume of your position and click to update your order.

I tried doing that before because I know this works in live trading, but in replay mode nothing happens when I double click. I am afraid that it is just not implemented yet :/

Hi there,

Indeed this is not implemented yet.

Best regards,

Panagiotis


@PanagiotisCharalampous