Get Signal Based On Current Position


Trying to think of the best way to generate a signal based on a current long position in a backtest (I know in live trading you could probably use the blotter for this, but for backtesting I don’t think that would work).

So if on one week you’re long on something, the next week you can generate a signal based on your entry price of that position one week prior?


For path-dependent logic like that, Zipline is a more natural fit. (Live trading coming soon.)