Question with TradeScript

I have two number “A” and “B” I want the buy back script to indicate when A - B is < 0.3
I’m new so can anyone show me the code.