Pro Indicators
Advanced momentum and volatility analysis (MACD, Bollinger Bands, Stochastic).
The Pro Tier introduces multi-dimensional analysis tools. Unlike Basic indicators which often return a single number, Pro indicators frequently return composite objects containing multiple data lines (e.g., Signal lines, Histograms).
A trend-following momentum indicator that shows the relationship between two moving averages of a security's price. It is the gold standard for trend momentum.
- Endpoint:
/api/indicators/macd - Method:
POST
| Name | Type | Default | Description |
|---|---|---|---|
fastPeriod | integer | 12 | The short-term EMA period. |
slowPeriod | integer | 26 | The long-term EMA period. |
signalPeriod | integer | 9 | The EMA of the MACD line itself. |
Returns an array of objects.
[
{
"macd": 150.2, // Fast EMA - Slow EMA
"signal": 145.1, // EMA(MACD)
"histogram": 5.1 // MACD - Signal
}
]- Signal Line Crossover: When the MACD crosses above the Signal line, it is a bullish signal. Below is bearish.
- Centerline Crossover: When MACD crosses above zero, the short-term average has risen above the long-term average (Bullish).
- Histogram: Represents the distance between MACD and Signal. Expanding histogram means trend is accelerating.
[!TIP] Look for divergence between price and the MACD histogram. If price is making new highs but the histogram peaks are getting lower, momentum is waning.
import { IndicatorsApi, CandlesApi } from "tickcatcher";
// 1. Get Candles
const candles = await new CandlesApi(config).basicCandles({ symbol: "ETHUSDT", timeframe: "1h", limit: 100 });
// 2. Calculate MACD
const values = await new IndicatorsApi(config).macd({
macdRequest: {
data: candles,
params: { fastPeriod: 12, slowPeriod: 26, signalPeriod: 9 }
}
});
const last = values[values.length - 1];
console.log(`MACD: ${last.macd}, Signal: ${last.signal}`);A volatility indicator consisting of a simple moving average (SMA) with two standard deviation lines plotted above and below it.
- Endpoint:
/api/indicators/bbands - Method:
POST
| Name | Type | Default | Description |
|---|---|---|---|
period | integer | 20 | The SMA period. |
stdDev | number | 2 | The multiplier for standard deviations. |
[
{
"middle": 65000.0, // The SMA
"upper": 66200.5, // Middle + (StdDev * Multiplier)
"lower": 63800.5 // Middle - (StdDev * Multiplier)
}
]- The Squeeze: When bands tighten, it indicates low volatility and often precedes a sharp price move.
- Overbought/Oversold: Tagging the upper band can mark overbought conditions; tagging the lower band, oversold.
[!TIP] Prices tend to return to the middle band (Mean Reversion).
import { IndicatorsApi, CandlesApi } from "tickcatcher";
// 1. Get Candles
const candles = await new CandlesApi(config).basicCandles({ symbol: "ETHUSDT", timeframe: "1h", limit: 100 });
// 2. Calculate Bollinger Bands
const values = await new IndicatorsApi(config).bbands({
bbandsRequest: {
data: candles,
params: { period: 20, stdDev: 2 }
}
});
const last = values[values.length - 1];
console.log(`Upper: ${last.upper}, Lower: ${last.lower}`);A momentum indicator comparing a particular closing price of a security to a range of its prices over a certain period of time.
- Endpoint:
/api/indicators/stoch - Method:
POST
| Name | Type | Default | Description |
|---|---|---|---|
period | integer | 14 | The lookback period (Fast %K). |
signalPeriod | integer | 3 | The smoothing period (Slow %D). |
[
{
"stochK": 85.5, // The fast line
"stochD": 82.1 // The slow signal line
}
]- Readings: Range is 0-100. >80 is Overbought, < 20 is Oversold.
- Crossovers: %K crossing above %D is bullish.
import { IndicatorsApi, CandlesApi } from "tickcatcher";
// 1. Get Candles
const candles = await new CandlesApi(config).basicCandles({ symbol: "ETHUSDT", timeframe: "1h", limit: 100 });
// 2. Calculate Stochastic
const values = await new IndicatorsApi(config).stoch({
stochRequest: {
data: candles,
params: { period: 14, signalPeriod: 3 }
}
});
const last = values[values.length - 1];
console.log(`%K: ${last.stochK}, %D: ${last.stochD}`);A Simple Moving Average applied to the Volume field rather than the Close price. Essential for confirming trend strength.
- Endpoint:
/api/indicators/volumema - Method:
POST
| Name | Type | Required | Description |
|---|---|---|---|
period | integer | Yes | The window size. |
Returns an array of numbers (the volume moving average).
[ 1500.5, 1450.2, 1600.8, ... ]- Confirmation: If price rises while Volume MA rises, the trend is supported by volume. If price rises but Volume MA falls, it may be a "fakeout".
import { IndicatorsApi, CandlesApi } from "tickcatcher";
// 1. Get Candles
const candles = await new CandlesApi(config).basicCandles({ symbol: "ETHUSDT", timeframe: "1h", limit: 100 });
// 2. Calculate Volume MA
const values = await new IndicatorsApi(config).volumeMa({
volumemaRequest: {
data: candles,
params: { period: 20 }
}
});
console.log(`Current VolMA: ${values[values.length - 1]}`);