Hello all, I'm trying to run some backtests on custom data and for that I have defined a custom tick and then a custom instrument, like this

var properties = new SymbolProperties("EUR", "USD", 1, 0.00001m, 1, "EURUSD");
var exchangeHours = SecurityExchangeHours.AlwaysOpen(TimeZones.NewYork);
this._symbol = this.AddData<MyTick>("EURUSD", properties, exchangeHours, Resolution.Tick).Symbol;

The test reads the data correctly and runs the algorithm. The problem is the profit is calculated incorrectly.

For example for the first closed trade, the two orders are:

2020-01-07 09:00:00,EURUSD,Buy,1,1.11955
2020-01-08 08:00:00,EURUSD,Sell,-1,1.115395

And if I check the portfolio, the recorder transaction value is: -0.0041550

This looks like the engine doesn't use any multiplier or lot size, and it just computes a subtraction between the two prices. I checked the securities database and for Oanda EURUSD, the lot size is 1, and the contract multiplier is 1, which is why I put the same numbers when creating my custom instrument.

What am I missing?

Author