Backtesting and Used Margin issue

Created at 20 Sep 2024, 19:41
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!
PR

protradefx

Joined 26.10.2017

Backtesting and Used Margin issue
20 Sep 2024, 19:41


Hi,

it seems used ee margin is not released after the position is closed. See example below after I have closed 1 positions.  I have got 0 open positions but still I got used margin.

Is this a potential bug?


@protradefx
Replies

PanagiotisCharalampous
21 Sep 2024, 06:26

Hi there,

It looks like a bug. Can you please provide us exact steps on how to reproduce this behavior e.g. cBot code, backtesting parameters etc?

Best regards,

Panagiotis


@PanagiotisCharalampous

ncel01
25 Sep 2024, 19:33 ( Updated at: 26 Sep 2024, 05:02 )

This seems to be the opposite of what I reported below and it can be somehow related.

In my case, both Positions.Count and Account.Margin return 0 inside Positions_Opened().

So far I didn't get any feedback regarding this.

https://ctrader.com/forum/ctrader-algo/44773/


@ncel01