Mega Indicators
Complex trading systems and price transformations (Ichimoku, SuperTrend, Heiken Ashi).
The Mega Tier includes full-fledged trading systems packaged as single indicators, as well as data transformation algorithms.
A comprehensive indicator that defines support and resistance, identifies trend direction, gauges momentum, and provides trading signals. "Ichimoku Kinko Hyo" translates to "one glance equilibrium chart".
- Endpoint:
/api/indicators/ichimoku - Method:
POST
| Name | Type | Default | Description |
|---|---|---|---|
conversionPeriod | integer | 9 | Tenkan-sen (Red Line) |
basePeriod | integer | 26 | Kijun-sen (Blue Line) |
spanPeriod | integer | 52 | Senkou Span B (Leading Span) |
displacement | integer | 26 | Chikou Span (Lagging Span) |
[
{
"conversion": 50100, // Tenkan
"base": 49500, // Kijun
"spanA": 49800, // Leading Span A
"spanB": 49200, // Leading Span B
"lagging": 51000 // Chikou Span
}
]- Tenkan/Kijun Cross: If Tenkan crosses above Kijun, it's a buy signal.
- Kumo Twist: When Span A crosses Span B (the cloud twists), it often signals a potential trend reversal date.
- Price vs Cloud: Price above cloud = Bullish. Price below cloud = Bearish. Inside cloud = Neutral/Choppy.
import { IndicatorsApi, CandlesApi } from "tickcatcher";
// 1. Get Candles
const candles = await new CandlesApi(config).basicCandles({ symbol: "BNBUSDT", timeframe: "1h", limit: 100 });
// 2. Calculate Ichimoku
const values = await new IndicatorsApi(config).ichimoku({
ichimokuRequest: {
data: candles,
params: {
conversionPeriod: 9,
basePeriod: 26,
spanPeriod: 52,
displacement: 26
}
}
});
const last = values[values.length - 1];
console.log(`Cloud Top: ${Math.max(last.spanA, last.spanB)}`);An excellent trend-following indicator that plots a line on the chart. If price > SuperTrend, the trend is Bullish. If price < SuperTrend, the trend is Bearish.
- Endpoint:
/api/indicators/supertrend - Method:
POST
| Name | Type | Default | Description |
|---|---|---|---|
period | integer | 10 | The ATR Period. |
multiplier | number | 3 | The factor to multiply ATR by. |
[
{
"value": 64500.5, // The line price
"trend": 1 // 1 (Up/Bullish) or -1 (Down/Bearish)
}
]- Buy Signal: When the indicator flips to "bullish" (green), close short positions and consider going long.
- Sell Signal: When the indicator flips to "bearish" (red), close long positions and consider going short.
- Trailing Stop: The SuperTrend line itself acts as an excellent dynamic trailing stop level.
import { IndicatorsApi, CandlesApi } from "tickcatcher";
// 1. Get Candles
const candles = await new CandlesApi(config).basicCandles({ symbol: "BNBUSDT", timeframe: "1h", limit: 100 });
// 2. Calculate SuperTrend
const values = await new IndicatorsApi(config).supertrend({
supertrendRequest: {
data: candles,
params: { period: 10, multiplier: 3 }
}
});
const last = values[values.length - 1];
console.log(`Trend: ${last.trend === 1 ? 'Bullish' : 'Bearish'} @ ${last.value}`);Heiken Ashi (Japanese for "Average Bar") is not just a line on a chart, but a transformation of the candlesticks themselves. It smooths out price action to isolate trends.
- Endpoint:
/api/indicators/heikenashi - Method:
POST
None. It relies purely on the input Candle data.
Returns an array of modified candles. Note that these are synthetic prices and should not be used as execution prices.
[
{ "ts": 17342000, "open": 64000, "high": 64500, "low": 63900, "close": 64200, "volume": 100 },
// ...
]- Green Candles w/ No Lower Shadow: Strong uptrend. Stay long.
- Red Candles w/ No Upper Shadow: Strong downtrend. Stay short.
- Candles with Shadows on Both Sides: Indecision or trend change.
import { IndicatorsApi, CandlesApi } from "tickcatcher";
// 1. Get Candles
const candles = await new CandlesApi(config).basicCandles({ symbol: "BNBUSDT", timeframe: "1h", limit: 100 });
// 2. Transform to Heiken Ashi
const haCandles = await new IndicatorsApi(config).heikenashi({ heikenashiRequest: { data: candles } });
const last = haCandles[haCandles.length - 1];
console.log(`HA Close: ${last.close}`);A momentum indicator that measures overbought and oversold levels. Similar to Stochastic but on a scale of 0 to -100.
- Endpoint:
/api/indicators/williams - Method:
POST
| Name | Type | Required | Description |
|---|---|---|---|
period | integer | Yes | Lookback period (usually 14). |
[ -10.5, -45.2, -88.1, ... ] // Range -100 to 0- Overbought: Above -20.
- Oversold: Below -80.
import { IndicatorsApi, CandlesApi } from "tickcatcher";
// 1. Get Candles
const candles = await new CandlesApi(config).basicCandles({ symbol: "BNBUSDT", timeframe: "1h", limit: 100 });
// 2. Calculate Williams %R
const values = await new IndicatorsApi(config).williamsr({
williamsrRequest: {
data: candles,
params: { period: 14 }
}
});
console.log(`Current %R: ${values[values.length - 1]}`);