I want to use following as a condition to trade: Subtract numeric value of SMA x from SMA y. Trade if result is bigger/smaller than result of same subtraction in previous period. Coding/help appreciated. Thank you.