Momentum reference
All 15 momentum in AlgoBarsX, each with its parameters, defaults, ranges and an example: rsi, stoch, stoch_rsi, macd, cci, williams_r, roc, momentum, tsi, ultimate_osc and 5 more.
rsi stoch stoch_rsi macd cci williams_r roc momentum tsi ultimate_osc awesome_osc ppo cmo trix mfi
rsi(source = close, length = 14)→ series<number>#
Relative strength index, from 0 to 100.
Parameters
| Name | Type | Default | Range | What it is |
|---|---|---|---|---|
source | series<number> | close | Series to calculate from. | |
length | int | 14 | 1 to 5000 | Number of bars in the calculation. |
r = rsi(close, 14)strategyindicatoralertlibrarysince 1.0
stoch(k_length = 14, k_smoothing = 3, d_smoothing = 3, on = bars())→ Stoch#
Stochastic oscillator.
Parameters
| Name | Type | Default | Range | What it is |
|---|---|---|---|---|
k_length | int | 14 | 1 to 5000 | %K lookback. |
k_smoothing | int | 3 | 1 to 500 | %K smoothing. |
d_smoothing | int | 3 | 1 to 500 | %D smoothing. |
on | BarSet | bars() | Bars to calculate on; defaults to the script's own bars. |
Outputs, read with a dot
| Name | Type | What it is |
|---|---|---|
k | series<number> | %K. |
d | series<number> | %D. |
s = stoch(14, 3, 3)strategyindicatoralertlibrarysince 1.0
stoch_rsi(source = close, rsi_length = 14, stoch_length = 14, k = 3, d = 3)→ Stoch#
Stochastic RSI.
Parameters
| Name | Type | Default | Range | What it is |
|---|---|---|---|---|
source | series<number> | close | Series to calculate from. | |
rsi_length | int | 14 | 1 to 5000 | RSI length. |
stoch_length | int | 14 | 1 to 5000 | Stochastic length. |
k | int | 3 | 1 to 500 | %K smoothing. |
d | int | 3 | 1 to 500 | %D smoothing. |
Outputs, read with a dot
| Name | Type | What it is |
|---|---|---|
k | series<number> | %K. |
d | series<number> | %D. |
srsi = stoch_rsi(close, 14, 14, 3, 3)strategyindicatoralertlibrarysince 1.0
macd(source = close, fast = 12, slow = 26, signal = 9)→ Macd#
Moving average convergence divergence.
Parameters
| Name | Type | Default | Range | What it is |
|---|---|---|---|---|
source | series<number> | close | Series to calculate from. | |
fast | int | 12 | 1 to 5000 | Fast EMA length. |
slow | int | 26 | 1 to 5000 | Slow EMA length. |
signal | int | 9 | 1 to 5000 | Signal EMA length. |
Outputs, read with a dot
| Name | Type | What it is |
|---|---|---|
macd | series<number> | MACD line. |
signal | series<number> | Signal line. |
histogram | series<number> | MACD minus signal. |
m = macd(close, 12, 26, 9)rising = macd(close).histogram > 0strategyindicatoralertlibrarysince 1.0
cci(source = hlc3, length = 20)→ series<number>#
Commodity channel index.
Parameters
| Name | Type | Default | Range | What it is |
|---|---|---|---|---|
source | series<number> | hlc3 | Series to calculate from. | |
length | int | 20 | 1 to 5000 | Number of bars in the calculation. |
c = cci(hlc3, 20)strategyindicatoralertlibrarysince 1.0
williams_r(length = 14, on = bars())→ series<number>#
Williams %R.
Parameters
| Name | Type | Default | Range | What it is |
|---|---|---|---|---|
length | int | 14 | 1 to 5000 | Number of bars in the calculation. |
on | BarSet | bars() | Bars to calculate on; defaults to the script's own bars. |
wr = williams_r(14)strategyindicatoralertlibrarysince 1.0
roc(source = close, length = 9)→ series<number>#
Rate of change in percent.
Parameters
| Name | Type | Default | Range | What it is |
|---|---|---|---|---|
source | series<number> | close | Series to calculate from. | |
length | int | 9 | 1 to 5000 | Number of bars in the calculation. |
change = roc(close, 9)strategyindicatoralertlibrarysince 1.0
momentum(source = close, length = 10)→ distance of source#
Difference from the value length bars ago.
Parameters
| Name | Type | Default | Range | What it is |
|---|---|---|---|---|
source | series<number> | close | Series to calculate from. | |
length | int | 10 | 1 to 5000 | Number of bars in the calculation. |
mom = momentum(close, 10)strategyindicatoralertlibrarysince 1.0
tsi(source = close, long = 25, short = 13, signal = 13)→ Tsi#
True strength index.
Parameters
| Name | Type | Default | Range | What it is |
|---|---|---|---|---|
source | series<number> | close | Series to calculate from. | |
long | int | 25 | 1 to 5000 | Long smoothing. |
short | int | 13 | 1 to 5000 | Short smoothing. |
signal | int | 13 | 1 to 5000 | Signal length. |
Outputs, read with a dot
| Name | Type | What it is |
|---|---|---|
tsi | series<number> | TSI line. |
signal | series<number> | Signal line. |
t = tsi(close, 25, 13, 13)strategyindicatoralertlibrarysince 1.0
ultimate_osc(fast = 7, middle = 14, slow = 28, on = bars())→ series<number>#
Ultimate oscillator.
Parameters
| Name | Type | Default | Range | What it is |
|---|---|---|---|---|
fast | int | 7 | 1 to 5000 | Fast length. |
middle | int | 14 | 1 to 5000 | Middle length. |
slow | int | 28 | 1 to 5000 | Slow length. |
on | BarSet | bars() | Bars to calculate on; defaults to the script's own bars. |
uo = ultimate_osc(7, 14, 28)strategyindicatoralertlibrarysince 1.0
awesome_osc(fast = 5, slow = 34, on = bars())→ series<number>#
Awesome oscillator.
Parameters
| Name | Type | Default | Range | What it is |
|---|---|---|---|---|
fast | int | 5 | 1 to 5000 | Fast length. |
slow | int | 34 | 1 to 5000 | Slow length. |
on | BarSet | bars() | Bars to calculate on; defaults to the script's own bars. |
ao = awesome_osc(5, 34)strategyindicatoralertlibrarysince 1.0
ppo(source = close, fast = 12, slow = 26, signal = 9)→ Macd#
Percentage price oscillator.
Parameters
| Name | Type | Default | Range | What it is |
|---|---|---|---|---|
source | series<number> | close | Series to calculate from. | |
fast | int | 12 | 1 to 5000 | Fast EMA length. |
slow | int | 26 | 1 to 5000 | Slow EMA length. |
signal | int | 9 | 1 to 5000 | Signal EMA length. |
Outputs, read with a dot
| Name | Type | What it is |
|---|---|---|
macd | series<number> | PPO line. |
signal | series<number> | Signal line. |
histogram | series<number> | PPO minus signal. |
pp = ppo(close, 12, 26, 9)strategyindicatoralertlibrarysince 1.0
cmo(source = close, length = 9)→ series<number>#
Chande momentum oscillator.
Parameters
| Name | Type | Default | Range | What it is |
|---|---|---|---|---|
source | series<number> | close | Series to calculate from. | |
length | int | 9 | 1 to 5000 | Number of bars in the calculation. |
chande = cmo(close, 9)strategyindicatoralertlibrarysince 1.0
trix(source = close, length = 18)→ series<number>#
Triple-smoothed EMA rate of change.
Parameters
| Name | Type | Default | Range | What it is |
|---|---|---|---|---|
source | series<number> | close | Series to calculate from. | |
length | int | 18 | 1 to 5000 | Number of bars in the calculation. |
tx = trix(close, 18)strategyindicatoralertlibrarysince 1.0
mfi(length = 14, on = bars())→ series<number>#
Money flow index.
Parameters
| Name | Type | Default | Range | What it is |
|---|---|---|---|---|
length | int | 14 | 1 to 5000 | Number of bars in the calculation. |
on | BarSet | bars() | Bars to calculate on; defaults to the script's own bars. |
flow_index = mfi(14)strategyindicatoralertlibrarysince 1.0