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.
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.
The advantages of this strategy include:
The risks of this strategy also include:
These risks can be reduced by optimizing parameters like SMA, Ichimoku, volume, and selecting suitable trading products.
The strategy can be optimized in several ways:
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.
/*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)