For code/output blocks: Use ``` (aka backtick or grave accent) in a single line before and after the block. See: http://commonmark.org/help/
Exiting trades due to margin closeout
-
Am I correct in assuming that backtrader doesn't exit trades when a margin call would have happened? I have a system I'm testing in forex which can be highly leveraged but I want to use a lesser amount. I've set the leverage to 4 (from 50 that is available at many forex outlets) but I'm not able to see that any trades have been exited for a margin exceedance if the market goes against the trade and the account value falls below the required amount for leverage.
It appears that new trades are rejected due to margin if there is insufficient money in the trading account, but I don't see where existing trades are exited due to margin.
I haven't seen this explicitly stated in the documentation yet but I might have missed it.
Thanks.