Quantity = entire position?

Is there a way to enter a STC order with a quantity automatically set to the entire open position? Here’s what I currently use.

C2TradingSignal(sigSTC, Amount=Ref(myQuant,-BSB));

myQuant is my formula used to determine the position size when entering the position. BSB is the number of bars since the buy signal. For some reason, however, I’ve had the STC amount off by 1 from the BTO quantity, leaving me with a stranded share. I’d prefer something like this.

C2TradingSignal(sigSTC, Amount=ALL);

Thoughts?