0bps

Strategy vault / Momentum

Momentum Analysis Ichimoku Cloud Fog Lightning Trading Strategy

The Momentum Analysis Ichimoku Cloud Fog Lightning Trading Strategy is a swift, momentum-based trading approach that utilizes the Ichimoku Cloud components but with tailored parameters suited for the 5-minute…

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

IMG

Overview

The Momentum Analysis Ichimoku Cloud Fog Lightning Trading Strategy is a swift, momentum-based trading approach that utilizes the Ichimoku Cloud components but with tailored parameters suited for the 5-minute timeframe. This strategy is designed to capitalize on small price movements that are frequent and more pronounced.

Strategy Principle

The strategy uses the Conversion Line, Base Line and Cloud Fog as momentum and trend signals. Specifically:

  • Conversion Line: Represents the midpoint of the highest and lowest prices over the past 9 periods, used to gauge momentum.
  • Base Line: Reflects the midpoint of the highest and lowest prices over the past 26 periods, indicating longer-term price trends.
  • Cloud Fog: Plots support and resistance levels 26 periods ahead, representing overall market sentiment.

The long entry condition is when the Conversion Line crosses above the Base Line and the closing price is above both edges of the Cloud Fog. The short entry condition is the opposite.

The long exit condition is when the Conversion Line crosses below the Base Line or the price falls below the Cloud Fog. The short exit condition is the opposite.

Advantage Analysis

The greatest advantage of this strategy is that the Ichimoku Cloud provides clear and visual momentum and trend signals. Combined with strict risk management rules, losses can be cut quickly and profits allowed to run, a cornerstone of successful lightning trading strategies.

In addition, substantial overall profits can be accumulated through making a large number of small profitable trades.

Risk Analysis

Lightning trading strategies, including this one, require quick decision-making, often automated trading systems, and are more sensitive to transaction costs. As such, they may be more suitable for experienced traders, or those with the ability to closely monitor and execute trades rapidly.

In addition, if losses are not cut quickly, small losses can also accumulate into large losses.

Optimization Directions

The strategy can be optimized by adjusting the periods of the Conversion Line and Base Line to adapt to different market environments. For example, shorten the periods in more volatile markets; lengthen the periods in more trending markets.

In addition, different combinations of parameters can be tested to find the optimal settings. For example, the 5-minute, 15-minute, 30-minute and other timeframes can be examined.

Finally, other indicators can also be incorporated for optimization. For example, combine with the momentum indicator to gauge trend strength; also combine with the ATR indicator to set stop loss ranges.

Summary

The Momentum Analysis Ichimoku Cloud Fog Lightning Trading Strategy utilizes the Ichimoku Cloud to determine changes in momentum and trends, capturing short-term fluctuations in prices on the hourly and minute levels. Characteristics include high trading frequency and smaller per trade profit targets. The biggest advantage of this strategy is the Ichimoku Cloud provides clear and intuitive signals, which when combined with strict stop loss principles, can achieve relatively safe and steady profits. But as a lightning trading strategy, also beware of the risk of accumulated small losses leading to larger drawdowns, therefore it is only suitable for experienced traders who can closely monitor the markets. Through continual testing and optimization of parameters, even better results can be achieved with this strategy.

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_51.5Stop Loss (%)
v_input_6trueTake Profit (%)

Source Pine Script

/*backtest
start: 2023-10-24 00:00:00
end: 2023-11-23 00:00:00
period: 1h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

//@version=5
strategy("Ichimoku Scalping Strategy", shorttitle="Ichimoku Scalp", overlay=true)

// Define Ichimoku Cloud components with shorter periods for scalping
conversionPeriods = input(9, title="Conversion Line Periods")
basePeriods = input(26, title="Base Line Periods")
laggingSpan2Periods = input(52, title="Lagging Span 2 Periods")
displacement = input(26, title="Displacement")

// Calculate Ichimoku Cloud components
tenkanSen = ta.sma((high + low) / 2, conversionPeriods)
kijunSen = ta.sma((high + low) / 2, basePeriods)
senkouSpanA = (tenkanSen + kijunSen) / 2
senkouSpanB = ta.sma((high + low) / 2, laggingSpan2Periods)

// Plot Ichimoku Cloud components
p1 = plot(tenkanSen, color=color.green, linewidth=1, title="Tenkan Sen")
p2 = plot(kijunSen, color=color.red, linewidth=1, title="Kijun Sen")
p3 = plot(senkouSpanA, color=color.blue, linewidth=1, title="Senkou Span A", offset=displacement)
p4 = plot(senkouSpanB, color=color.orange, linewidth=1, title="Senkou Span B", offset=displacement)
fill(p3, p4, color=color.purple, transp=30, title="Cloud")

// Define strategy conditions for scalping
enterLong = ta.crossover(tenkanSen, kijunSen) and close > senkouSpanA[displacement] and close > senkouSpanB[displacement]
exitLong = ta.crossunder(tenkanSen, kijunSen) or close < senkouSpanA[displacement]

// Enter short condition for scalping
enterShort = ta.crossunder(tenkanSen, kijunSen) and close < senkouSpanA[displacement] and close < senkouSpanB[displacement]
exitShort = ta.crossover(tenkanSen, kijunSen) or close > senkouSpanA[displacement]

// Execute strategy
if (enterLong)
    strategy.entry("Long", strategy.long)
if (exitLong)
    strategy.close("Long")
if (enterShort)
    strategy.entry("Short", strategy.short)
if (exitShort)
    strategy.close("Short")

// Risk management: setting a stop loss and take profit for scalping
stopLossPercent = input(1.5, title="Stop Loss (%)")
takeProfitPercent = input(1.0, title="Take Profit (%)")
stopLossPrice = strategy.position_avg_price * (1 - stopLossPercent / 100)
takeProfitPrice = strategy.position_avg_price * (1 + takeProfitPercent / 100)

// Set stop loss and take profit for long positions
if (strategy.position_size > 0)
    strategy.exit("Long SL/TP", "Long", stop=stopLossPrice, limit=takeProfitPrice)
    
// Set stop loss and take profit for short positions
if (strategy.position_size < 0)
    strategy.exit("Short SL/TP", "Short", stop=stopLossPrice, limit=takeProfitPrice)

Published by ChaoZhang on the FMZ strategy square · last modified 2023-11-24. 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/Momentum-Analysis-Ichimoku-Cloud-Fog-Lightning-Trading-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