Backtesting BTC/USD not calculating Margin Used correctly
Backtesting BTC/USD not calculating Margin Used correctly
11 Jan 2021, 12:57
When Backtesting BTC/EUR or BTC/USD on Spotware Beta 3.8 the Margin used is more than 100 times smaller than it should be. It might be using the account Leverage (500) rather than Eg. Symbol.DynamicLeverage[0].Leverage (25) but there also seems to be another factor.
I also see this occuring on ICMarkets while backtesting
This does not occur when in RealTimeMode.
I also note Symbol.Lotsize = 1 which I think should be 100 as Symbol.VolumeInUnitsMin = 0.01
When 1 lot is traded the Volume shows as 1 which I think should be 100.
Also when the Quantity is below 1 the Positions and events tabs show 0 quantity and volume.
These issues seem to be limited to backtesting mode. Optimization seems to have the Margin Used issue, but shows Quantity correctly.
It does occur to me that it is likely impossible for Backtesting and Optimization modes to access the data to convert to the account currency so this may the extra factor mentioned above.
As I am trying to impliment Margin used into my cbot I am testing it on the lowest leverage pairs.
The following screenshot is of a 0.5 lot trade in Backtesting mode in the Spotware public beta.