I'm working on a strategy with 3 parameters, a lower price limit, a profit percentage to take per ladder rung, and a percentage of my capital to risk. The strategy will set up a ladder of buys, and sells. I want to set up 3 buys, and 2 sells after initially buying enough of the asset to cover the sells. Each time I pass a rung and take profit, I want to generate a new buy or sell above or below the highest buy in the grid, or the lowest low (downto the low price limit).
My question is really I don't know how to structure this within the should_long/go_long/should_short/go_short/update_position framework. I know how to generate my ladder, and how to go long/short; but tracking what trades exist in the system so I can return True in should_long/should_short is what I'm stuck on. Any suggestions would be appreciated.