Backtest - Multiple Sell signals

I have some code such as:
Buy = code

Sell = code

Applystop(StopModePoint, …)

The Applystop line seems to replace the first Sell signal.

I would like the first signal (earliest bar) to be in effect.

Do I need to calculate bar by bar in low level CBI or is there a better way?