I was able to implement a custom slippage model using this:

class CustomSlippageModel: def GetSlippageApproximation(self, asset, order): return 0.1

But I really want to set the slippage to always be 0.2 percent of whatever the trade price is.  I figured it should be something like this:

class CustomSlippageModel: def GetSlippageApproximation(self, asset, order): return asset.Price * 0.002

But when I run that the backtester just stays stuck on Queueing the whole time... Is this the right way to do it?

 

Thanks

Author