Tquant Lab, Python, Backpacking, Tejapi Application.
variable to record the last purchase price Setting the context.trailing_count variable to record the number of trailing stop instances Setting the context.buy_count variable to limit the maximum number of trades per stock from zipline.finance import slippage, commission from zipline.api import *