Strategy vault / Trend following
SMA Crossover Ichimoku Market Depth Volume Based Quantitative Trading Strategy
This strategy is named "SMA Crossover Ichimoku Market Depth Volume Based Quantitative Trading Strategy". It mainly uses the golden cross and dead cross signals of the SMA lines, combined with Ichimoku market depth…

Overview
This strategy is named "SMA Crossover Ichimoku Market Depth Volume Based Quantitative Trading Strategy". It mainly uses the golden cross and dead cross signals of the SMA lines, combined with Ichimoku market depth cloud chart indicators and trading volume indicators, to implement automatic trading of bitcoin in both directions.
Principle
The strategy is mainly based on the following principles:
Use SMA lines with different parameters to construct golden cross and dead cross trading signals. A buy signal is generated when the short term SMA crosses over the long term SMA, and a sell signal is generated when the short term SMA crosses below the long term SMA.
Use the Ichimoku cloud chart indicator to determine market depth and trends. A buy signal is only generated when the closing price is higher than the leading span A and leading span B of the cloud chart, and a sell signal is only generated when the closing price is lower than span A and span B, which filters out most false signals.
Use trading volume indicators to filter out false signals with low volume. Buy and sell signals are only generated when the trading volume is greater than the average volume over a certain period.
Use the plotshape function to mark the positions of buy and sell signals on the chart.
In this way, the strategy takes into account short-term and long-term trends, market depth indicators and trading volume indicators to optimize trading decisions.
Advantage Analysis
The advantages of this strategy include:
- Use SMA golden and dead cross to generate basic buy and sell signals, avoiding too much complexity.
- Use Ichimoku cloud chart to determine market depth and medium-long term trends, which can effectively filter out noise.
- Combine trading volume indicators to avoid false breakouts with low volume.
- Large parameter tuning space for optimization across different markets.
- Clear logic and easy to understand and modify.
- Intuitively display buy and sell signals for ease of strategy testing and optimization.
Risk Analysis
The risks of this strategy also include:
- SMA lines can easily generate misleading signals and require filters.
- The effect of Ichimoku cloud chart judging market structure depends on parameter settings.
- Trading volume magnification effect may interfere with volume indicator judgement.
- Trending and oscillating markets need different parameter settings.
- There is some time lag.
These risks can be reduced by optimizing parameters like SMA, Ichimoku, volume, and selecting suitable trading products.
Optimization Directions
The strategy can be optimized in several ways:
- Test more MA indicators like EMA, VIDYA, etc.
- Try different Ichimoku parameter settings.
- Use momentum indicators for supplementary judgement.
- Add stop loss mechanisms.
- Optimize parameters for different markets and products.
- Use machine learning to dynamically optimize parameters.
Conclusion
This strategy integrates SMA crossover, market depth indicators and volume indicators to form a relatively stable and reliable quantitative trading strategy. It can be further optimized through parameter tuning, adding new technical indicators, etc. The backtest and live results are promising. In summary, this strategy provides a good learning case for beginners.
Parameters
| Name | Default | What it controls |
|---|---|---|
| v_input_1 | 14 | Short SMA Length |
| v_input_2 | 21 | Long SMA Length |
| v_input_3 | 20 | Volume Moving Average Length |
| v_input_4 | 9 | Tenkan Length |
| v_input_5 | 26 | Kijun Length |
| v_input_6 | 52 | Senkou B Length |
| v_input_7 | 26 | Displacement |
Source Pine Script
/*backtest
start: 2024-01-16 00:00:00
end: 2024-01-23 00:00:00
period: 1h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=4
strategy("SMA Crossover with Ichimoku & Volume", shorttitle="SCIV", overlay=true)
// Define the length of SMA
shortSmaLength = input(14, title="Short SMA Length")
longSmaLength = input(21, title="Long SMA Length")
volumeLength = input(20, title="Volume Moving Average Length")
// Calculate the SMA and Volume MA
shortSma = sma(close, shortSmaLength)
longSma = sma(close, longSmaLength)
volumeMa = sma(volume, volumeLength)
// Define the lengths of the Ichimoku Cloud components
tenkanLength = input(9, title="Tenkan Length")
kijunLength = input(26, title="Kijun Length")
senkouBLength = input(52, title="Senkou B Length")
displacement = input(26, title="Displacement")
// Calculate the Ichimoku Cloud components
tenkan = (highest(high, tenkanLength) + lowest(low, tenkanLength)) / 2
kijun = (highest(high, kijunLength) + lowest(low, kijunLength)) / 2
senkouA = (tenkan + kijun) / 2
senkouB = (highest(high, senkouBLength) + lowest(low, senkouBLength)) / 2
// Define the conditions for entry and exit with Ichimoku filter and Volume filter
buyEntry = crossover(shortSma, longSma) and close > senkouA[displacement] and close > senkouB[displacement] and volume > volumeMa
sellEntry = crossunder(shortSma, longSma) and close < senkouA[displacement] and close < senkouB[displacement] and volume > volumeMa
// Plot buy/sell conditions on the chart for visual inspection
plotshape(buyEntry, style=shape.labelup, location=location.belowbar, color=color.green, text="Buy", size=size.small)
plotshape(sellEntry, style=shape.labeldown, location=location.abovebar, color=color.red, text="Sell", size=size.small)
// Execute the strategy
if (buyEntry)
strategy.entry("Buy", strategy.long)
if (sellEntry)
strategy.entry("Sell", strategy.short)Published by ChaoZhang on the FMZ strategy square · last modified 2024-01-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.
/agenkit build a production-grade trading bot with a backtest engine, risk controls and paper trading by default from strategies/SMA-Crossover-Ichimoku-Market-Depth-Volume-Based-Quantitative-Trading-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
- Ichimoku Trend Following StrategyPine Script · Trend following · 1d
- Ichimoku Moving Average Crossover StrategyPine Script · Trend following · 1h
- Adaptive Trading Strategy Based on Stochastic RSI Dual Line CrossoverPine Script · Trend following · 4h
- Dual ATR Channel Trend Following StrategyPine Script · Trend following · 15m
- Dual Moving Average Convergence Trend Tracking StrategyPine Script · Trend following · 1d
- Dual SMA Crossover StrategyPine Script · Trend following · 5m