0bps

Strategy vault / Breakout

Log Ichimoku Cross Variety Strategy

This strategy is a simple cryptocurrency trading strategy that uses log-scale Ichimoku clouds to generate trading signals. It is designed for cross-cryptocurrency trading between varieties.

Author
ChaoZhang
Complexity
Starter · 45 lines
Parameters
5
Backtest bar
1h · intraday
Tested on
BTC/USDT · futures

IMG

Overview

This strategy is a simple cryptocurrency trading strategy that uses log-scale Ichimoku clouds to generate trading signals. It is designed for cross-cryptocurrency trading between varieties.

Strategy Logic

The strategy uses a custom log-scale Ichimoku indicator as the primary trading indicator. The Ichimoku indicator usually contains the conversion line, base line and lagging span. In this strategy, these lines are calculated in logarithmic price space.

Specifically, the conversion line is the recent 9-period mean of the log lows and log highs. The base line is the 26-period mean of the same. Lead line 1 is the mean of the conversion and base lines. Lead line 2 is the 52-period lookback mean.

A long signal is generated when lead line 1 crosses over lead line 2. A short signal is generated on the cross under.

Advantage Analysis

The key advantage of this strategy is using the log-scale Ichimoku indicator better captures trend changes across cryptocurrencies. Percentage changes are more consistent in logarithmic space, resulting in more reliable trading signals.

Another advantage is that it facilitates cross-variety trading of cryptocurrencies. Using the log-Ichimoku improves comparability of price changes across different crypto varieties.

Risk Analysis

The main risk is that Ichimoku signals may fail. Particularly in volatile crypto markets, performance of Ichimoku can deteriorate.

Also, logarithmic transforms may fail during extreme moves. Comparability of logarithmic space decreases when prices make anomalous jumps.

Enhancement Opportunities

The strategy can be enhanced by:

  1. Adding filters to confirm Ichimoku signals to reduce false signals

  2. Updating optimal parameters more suited to crypto varieties

  3. Adding pre-entry filters like volume to avoid false breakouts

  4. Optimizing entry rules and adding stops and profit targets to control risk

Conclusion

This strategy utilizes the logarithmic Ichimoku indicator to design a quantitative strategy tailored to cryptocurrencies and cross-variety trading. While advantageous for capturing trends, it has risks. Further optimizations to parameters, filters and risk controls can enhance strategy performance.

Parameters

NameDefaultWhat it controls
v_input_19Conversion Line Periods
v_input_226Base Line Periods
v_input_352Lagging Span 2 Periods
v_input_426Displacement
v_input_5falseshow clouds

Source Pine Script

/*backtest
start: 2024-01-22 00:00:00
end: 2024-02-21 00:00:00
period: 1h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

//@version=3
strategy(title="Log Ichimoku Strategy", shorttitle="Ichi Strategy", overlay=true)

drop1st(src) =>
    x = na
    x := na(src[1]) ? na : src

conversionPeriods = input(9, minval=1, title="Conversion Line Periods"),
basePeriods = input(26, minval=1, title="Base Line Periods")
laggingSpan2Periods = input(52, minval=1, title="Lagging Span 2 Periods"),
displacement = input(26, minval=1, title="Displacement")
showClouds = input(false, "show clouds")

loglows = log(drop1st(low))
loghighs = log(drop1st(high))

donchian(len) =>
    avg(lowest(loglows, len), highest(loghighs, len))

conversionLine = donchian(conversionPeriods)
baseLine = donchian(basePeriods)
leadLine1 = avg(conversionLine, baseLine)
leadLine2 = donchian(laggingSpan2Periods)

plot(showClouds ? exp(conversionLine) : na, color=#0496ff, title="Conversion Line")
plot(showClouds ? exp(baseLine) : na, color=#991515, title="Base Line")

p1 = plot(showClouds ? exp(leadLine1) : na, offset = displacement, color=green, title="Lead 1")
p2 = plot(showClouds ? exp(leadLine2) : na, offset = displacement, color=red, title="Lead 2")
fill(p1, p2, color = showClouds ? (leadLine1 > leadLine2 ? green : red) : na)

if (crossover(leadLine1, leadLine2))
    strategy.entry("Ichi-LE", strategy.long, oca_name="Ichi", comment="Ichi")

if (crossunder(leadLine1, leadLine2))
    strategy.entry("Ichi-SE", strategy.short, oca_name="Ichi",  comment="Ichi")

Published by ChaoZhang on the FMZ strategy square · last modified 2024-02-22. 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.

in Claude Code, Cursor, Codex & 4 more
/agenkit build a production-grade trading bot with a backtest engine, risk controls and paper trading by default from strategies/Log-Ichimoku-Cross-Variety-Strategy.md
  1. npx agenkit install engineering-kit in your project
  2. Paste the command into your agent and approve each phase
  3. 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

esc

Try , , or .

↑↓ move↵ open