Convert strategy into code/alert for testing

Buy if Total Buy Quantity > 7* (Total Sell quantity) & ((High-Close)/Close)-((LTP-Close)/Close)>.01

Sell if Total Sell Quantity > 7*(Total Sell Quantity) & ((Close-Low)/Close)-((Close-LTP)/Close)>.01

you have mentioned in your condition total buy quantity greater than sell quantity which can not be defined by tradescript, chart data can not know your buy or sell quantity

Can you suggest any method to create an alert for this strategy ?