Type/to search

Rainbow Moving Average Trading Strategy

Cryptocurrency
Created: 2023-09-28 11:01:59
Last modified: 3 years ago
1
Follow
1781
Followers

Overview

The Rainbow Moving Average trading strategy is designed based on the Rainbow Moving Average indicator. This strategy identifies trend direction through a rainbow moving average system with 7 moving averages, and filters out false signals with the RSI indicator to achieve low-risk entry.

Strategy Logic

The strategy generates trading signals through the following steps:

  1. Build the rainbow moving average system. It contains 7 moving averages. The first moving average has a period of 12 and takes the closing price as source data. The other 6 moving averages have progressively decreasing periods of 3, with previous moving average as source.

  2. Determine trend direction. If the first moving average is on top of the rainbow, define it as uptrend. If it's at the bottom, define it as downtrend. If it's in the middle, define it as consolidation.

  3. Generate signals. When the trend changes from uptrend to downtrend, a sell signal is generated. When the trend changes from downtrend to uptrend, a buy signal is generated. When the trend changes from consolidation to uptrend or downtrend, close existing position.

  4. RSI filter. Only accept signals when RSI shows normal status. The first RSI should be between overbought and oversold zone to avoid false breakout. The second RSI should be outside of middle zone to ensure strong momentum.

Advantages

The advantages of this strategy include:

  1. The rainbow moving average system accurately identifies trend direction. Multiple moving averages combine to filter out market noise and spot trend reversal.

  2. The dual RSI filter mechanism effectively avoids false breakout signals and being trapped. The first RSI ensures being in normal zone while the second RSI guarantees strong enough momentum.

  3. Combining trend and reversal indicators allows timely entry at trend reversal, while avoiding chasing momentum.

  4. Active position closing during consolidation avoids the risk of range-bound markets.

  5. The strategy offers large parameter optimization space, which can be tuned for different products and timeframes to achieve better results.

Risks

The main risks of this strategy:

  1. Unclear trend reversal may generate false signals and cause losses. Adjusting moving average periods can make reversal signals clearer.

  2. Frequent opening and closing during long consolidation increases costs and slippage. Optimizing RSI parameters can strengthen filtration in consolidation.

  3. Delayed reversal enlarges losses after initial signal. Increasing moving average period difference makes signals timelier.

  4. Improper parameter settings may filter out correct signals or cause signal lagging. Parameters need to be adjusted per product character.

Optimization Directions

The strategy can be optimized in the following aspects:

  1. Moving average parameter optimization, including period length, period ratio, MA type etc, to make trend judgment more accurate.

  2. RSI parameter optimization, including period, overbought/oversold levels, neutral zone etc, to make filtration more precise.

  3. Timeframe optimization, to find the optimal timeframe.

  4. Product optimization, to adjust parameters and rules to best fit different products.

  5. Adding stop loss and take profit to control risk and profit size.

Conclusion

The Rainbow Moving Average trading strategy combines trend determination and signal filtering to capture reversal signals effectively. With accurate judgment and controllable risks, this strategy can become very practical after parameter tuning and logic refinement. Overall, it is worth in-depth research and application.

Source
Pine
/*backtest
start: 2023-08-28 00:00:00
end: 2023-09-27 00:00:00
period: 2h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

//╔════════════════════════════════════════════════════════════════════════════╗
//║Rainbow Backtesting base on "Rainbow Moving Average" Strategy as below:     ║
//║1.Rainbow Moving Average setup                                              ║
//║- Source: source of 1st MA                                                  ║
Strategy parameters
Strategy parameters
=== Rainbow Moving Average ===
Source
Type
Period
Displacement
=== Trend Color ===
Up
Down
No
=== RSI Filter ===
Filter
Over Filter
Period
Overbought
Oversold
Middle Filter
Period
Upper
Lower
Comment
All comments (0)
No data
No data
  • 1
iPhone Download
Forums
PINE Language
© 2015 - ∞ INVENTOR PTE LTD (SG)