Strategy vault / Trend following
ADX Based One Hour TENKAN KIJUN Cross Trend Tracking Strategy
This is a simple yet profitable trend tracking strategy based on one-hour time frame TENKAN and KIJUN cross in the ICHIMOKU system combined with ADX indicator to filter out weak trending markets to generate trading…

Overview
This is a simple yet profitable trend tracking strategy based on one-hour time frame TENKAN and KIJUN cross in the ICHIMOKU system combined with ADX indicator to filter out weak trending markets to generate trading signals. It works best on large market cap altcoin BTC pairs like ETH/BTC.
Strategy Logic
The strategy uses Conversion Line (TENKAN) and Base Line (KIJUN) cross in ICHIMOKU system to determine market trend direction. TENKAN line is calculated based on the average of highest high and lowest low of past 18 candles, representing fast conversion line. KIJUN line is based on 58 candle periods, standing for standard conversion line.
When TENKAN cross above KIJUN, it is a bullish signal. When TENKAN cross below KIJUN, it is a bearish signal. This aims to capture medium-term trend reversal.
In addition, ADX indicator is used to gauge the strength of the trend. Only when ADX is above 20, indicating a strong trend, will the signal be triggered.
In summary, this strategy identifies mid-term trend direction via TENKAN and KIJUN cross, and uses ADX to filter out false breakouts, in order to track long-term trends.
Advantage Analysis
The main advantages of this strategy are:
Using mature and reliable ICHIMOKU system to determine trend direction and turning points.
Filtering out weak trending market using ADX to avoid whipsaws in consolidation.
The one-hour timeframe filters market noise and only captures mid-to-long term trends.
The logic is straightforward and easy to follow for trend traders.
Solid backtesting results especially on high market cap coins like ETH/BTC.
Risk Analysis
Some risks to note about this strategy:
ICHIMOKU parameters are sensitive, needs customization for different pairs.
ADX may lag in some cases, causing missed entry.
Underperforms in ranging markets with frequent stop loss hit.
Performance varies greatly across different pairs and timeframes.
Long holding of positions can be risky, proper stop loss/take profit needed.
Optimization can be done via ADX parameter tuning, adding filters like MACD to reduce false signals, or dynamical adjustment of parameters for robustness.
Optimization Directions
Some major directions to improve the strategy:
Dynamic optimization of TENKAN and KIJUN parameters for better adaptation.
Searching for better trend indicators to replace or combine with ADX.
Adding stop loss/take profit to control risk/reward ratio.
Ensemble modeling with complementary indicators to improve stability.
Modularization and flexibility for parameter tuning on more pairs.
Quantitative risk management e.g. max drawdown control against extreme moves.
Conclusion
In conclusion, this is a simple yet practical trend tracking strategy, mainly based on TENKAN/KIJUN cross and ADX to identify mid-to-long term trends and generate signals. It has shown positive backtesting results, especially on high market cap BTC pairs like ETH/BTC, with relatively stable profitability. But it also relies on parameter tuning, requires per-pair optimization. Risk control per trade is also necessary to limit losses when trends reverse. Overall this offers valuable reference of a trend following strategy for algo traders.
Parameters
| Name | Default | What it controls |
|---|---|---|
| v_input_1_close | 0 | Source: close | high | low | open | hl2 | hlc3 | hlcc4 | ohlc4 |
| v_input_2 | 18 | Conversion Line Periods (Tenkan) |
| v_input_3 | 58 | Base Line Periods (Kijun) |
| v_input_4 | 14 | ADX Smoothing |
| v_input_5 | 14 | DI Length |
| v_input_6 | 20 | threshold |
| v_input_7 | 3 | From Day |
| v_input_8 | 9 | From Month |
| v_input_9 | 2018 | From Year |
| v_input_10 | 3 | To Day |
| v_input_11 | 9 | To Month |
| v_input_12 | 2019 | To Year |
Source Pine Script
/*backtest
start: 2023-11-07 00:00:00
end: 2023-12-07 00:00:00
period: 1h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=2
strategy(title="Odin's Kraken (TK Cross Strategy)", shorttitle="Odin's Kraken", overlay=true, default_qty_type=strategy.percent_of_equity, default_qty_value=100)
src = input(close, title="Source")
// define tk in ichimoku
conversionPeriods = input(18, minval=1, title="Conversion Line Periods (Tenkan)"),
basePeriods = input(58, minval=1, title="Base Line Periods (Kijun)")
donchian(len) => avg(lowest(len), highest(len))
conversionLine = donchian(conversionPeriods)
baseLine = donchian(basePeriods)
TK_Uptrend = crossover(conversionLine,baseLine)
TK_Downtrend = crossunder(conversionLine,baseLine)
plot(conversionLine, color=lime, title="Tenkan", linewidth=3)
plot(baseLine, color=red, title="Kijun", linewidth=3)
// define ADX
adxlen = input(14, title="ADX Smoothing")
dilen = input(14, title="DI Length")
th = input(title="threshold", defval=20)
dirmov(len) =>
up = change(high)
down = -change(low)
plusDM = na(up) ? na : (up > down and up > 0 ? up : 0)
minusDM = na(down) ? na : (down > up and down > 0 ? down : 0)
truerange = rma(tr, len)
plus = fixnan(100 * rma(plusDM, len) / truerange)
minus = fixnan(100 * rma(minusDM, len) / truerange)
[plus, minus]
adx(dilen, adxlen) =>
[plus, minus] = dirmov(dilen)
sum = plus + minus
adx = 100 * rma(abs(plus - minus) / (sum == 0 ? 1 : sum), adxlen)
[plus, minus] = dirmov(dilen)
sig = adx(dilen, adxlen)
// backtesting range
// From Date Inputs
fromDay = input(defval = 3, title = "From Day", minval = 1, maxval = 31)
fromMonth = input(defval = 9, title = "From Month", minval = 1, maxval = 12)
fromYear = input(defval = 2018, title = "From Year", minval = 1970)
// To Date Inputs
toDay = input(defval = 3, title = "To Day", minval = 1, maxval = 31)
toMonth = input(defval = 9, title = "To Month", minval = 1, maxval = 12)
toYear = input(defval = 2019, title = "To Year", minval = 1970)
// Calculate start/end date and time condition
startDate = timestamp(fromYear, fromMonth, fromDay, 00, 00)
finishDate = timestamp(toYear, toMonth, toDay, 00, 00)
time_cond = true
// open long and short
longCondition = TK_Uptrend
if (longCondition and sig > 12 and time_cond)
strategy.entry("LONG", strategy.long)
shortCondition = TK_Downtrend
if (shortCondition and sig > 12 and time_cond)
strategy.entry("SHORT", strategy.short)
// close trade if backtesting criteria not met
if (not time_cond)
strategy.close_all()
Published by ChaoZhang on the FMZ strategy square · last modified 2023-12-08. Collected in the Quant Trading Vault. Unvalidated research: re-test with your own data and costs before trusting it.
Build this with AgenKit
A spec is not a trading system. Paste this into your coding agent and AgenKit runs a specialist team — architecture, test-first build, risk gates, review — with paper trading on by default.
/agenkit build a production-grade trading bot with a backtest engine, risk controls and paper trading by default from strategies/ADX-Based-One-Hour-TENKAN-KIJUN-Cross-Trend-Tracking-Strategy.md- npx agenkit install engineering-kit in your project
- Paste the command into your agent and approve each phase
- Get tests, backtest, risk controls and a paper-trading switch
Understand it first
Before you run this, read the lesson behind the idea and how to backtest it honestly. Specs like this one are the survivors of an unknown number of trials; deflate their results accordingly.
Related specs
- Crossing Moving Average Trend Tracking StrategyPine Script · Trend following · 2h
- Ichimoku Cloud Trend Following StrategyPine Script · Trend following · 1h
- Ichimoku Cloud MACD and Stochastic Based Multi Timeframe Trend Tracking StrategyPine Script · Trend following · 4h
- Multiple Timeframe Filtered Trend Following StrategyPine Script · Trend following · 1h
- Trend Following Strategy Based on Moving Average Crossover 430022Pine Script · Trend following · 1d
- Cloud Based Bollinger Bands Double Moving Average Quantitative Trend StrategyPine Script · Trend following · 1d