No, use a loop in the tick function, not the run function. The tick function runs at every price quote and has access to all trades.