I am getting some weird discrepancies between Portfolio.Cash and the cash reported in errors. Should I be using CashBook instead?

10012 | 02:13:38:

Buy 2019-05-01 12:10:00 1945.041905825USD - BTCUSD - Qty: 0.366 Price: 5294.985 Value: 1937.9645099999998

10013 | 02:13:38:

Backtest Handled Error: Order Error: id: 389, Insufficient buying power to complete order (Value:1941.9058), Reason: Your portfolio holds 7.077395825 USD, 0 USD of which are reserved for open orders, but your Buy order is for 0.365 BTC. Your order requires a total value of 1941.90585 USD, but only a total value of 5.32029 USD is available.

As you can see, Portfolio.Cash reports 1945 USD, but the error states I only have 5.3 USD available. Where is the difference?

Author