Vector Arithmetic Substraction
Under the Hood
SUB performs element-wise subtraction of two data series: Output[i] = Input1[i] - Input2[i]. This mathematical utility is fundamental for calculating spreads, differences, and oscillators. Most oscillators (like MACD) are essentially subtraction operations. SUB enables explicit difference calculations between any two series.
In Practice
Developers use SUB for creating spread indicators, calculating price differences between assets, or building custom oscillators. Essential for pairs trading (price1 - price2), relative performance tracking, and any strategy based on divergences or differences. SUB is the foundation of most momentum and oscillator indicators.
Build automated strategies using Vector Subtraction and hundreds of other indicators. Connect to your favourite exchange and let the bot execute trades 24/7 — no code required.