Is there a work around for setting a specific commission for each symbol in a backtest?
I am attempting to simulate slippage costs on 1 min midpoint price data for pairs of futures contracts however Wealth Lab's design which restricts slippage prices to within the low/high range of the bar severely underestimates true slippage in this scenario. Usually I would use the commission settings to reflect slippage however in this particular strategy the hedge ratio is constantly changing and as such a static global commission cost also incorrectly accounts for slippage.
Size:
Color:
You can integrate custom commission structure with the help of dedicated API. Check out the Community.Commissions project for the source code of an actual commission library:
Home - Community.CommissionsInside the main point of entry i.e. Calculate() method, check for current
bars.Symbol (or other properties) to apply your custom "commission":
CODE:
Please log in to see this code.
Size:
Color: