Margin Required for Backtesting - Incorrect?

Created at 26 May 2017, 14:05
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!
HI

hibikidan333

Joined 05.02.2016

Margin Required for Backtesting - Incorrect?
26 May 2017, 14:05


Dear Support

I have noticed that my bot places orders that require more margin than the balance can offer. Do you know if this is a known bug? When will this be fixed?


@hibikidan333
Replies

Spotware
24 Jul 2017, 17:53

Dear tony.truong.work,

Thanks your post. What you describe is a known behavior of cAlgo. Currently it does not check margin requirements and does not take stop outs into account. We plan to change this in the future and take margin requirements as well as stop outs into consideration.

Best Regards,

cTrader Team


@Spotware

hibikidan333
27 Jul 2017, 07:18

I was able to workaround this by providing a custom GetFitness method  

 

if (args.MaxEquityDrawdown > InitialInvestment ) { return 0 }


@hibikidan333