Type/to search

Snap Back Moving Average Counter-trend Strategy

Cryptocurrency
Created: 2023-10-23 15:31:21
Last modified: 3 years ago
1
Follow
1781
Followers

img

Overview

This strategy mainly utilizes the principles of moving averages to find countertrend opportunities when a stock is oversold in the short term. When the fast moving average is below the slow moving average, it indicates the stock is in a downtrend. When the price breaks the fast moving average by a certain margin, the downside is limited and a bounce is likely. This strategy aims to capture such oversold bounces by going long when the price crosses back above the fast moving average.

Strategy Logic

  1. Set up a fast moving average like 8EMA and a slow moving average like 20SMA.

  2. When SMA is above EMA, it indicates an uptrend. When SMA is below EMA, it indicates a downtrend.

  3. When the price breaks the EMA by a certain margin (e.g. 2-10%), the stock is oversold and a bounce is more likely.

  4. When the price crosses back above the EMA, it triggers a buy signal.

  5. Set the stop loss near EMA, take profit near middle SMA (e.g. 50SMA) or use a percentage take profit.

  6. Liquidate when the price crosses back below EMA.

Advantages

  • Utilizes the reliable principles of moving averages.

  • The fast EMA and oversold margin improves bounce probability.

  • Customizable stop loss and take profit controls risk.

  • Flexible position sizing suits different risk appetite.

Risks

  • Failed bounces can still occur despite oversold margin.

  • Moving averages have lag and may miss local bounces.

  • Stop loss near EMA may get stopped out easily on volatility.

  • Some manual parameter tuning required which greatly affects results.

  • Results are correlated with stock picking.

Enhancement Opportunities

  • Add trend filter to avoid countertrend trades.

  • Add volume filter to improve probability.

  • Consider dynamic trailing stop loss instead of static.

  • Research optimal parameter sets to reduce dependency.

  • Incorporate stock picking for better selection.

Conclusion

The strategy has a clear logic and is easy to understand as a typical moving average mean reversion system. The advantages are stability and risk control, making it suitable for beginners. But it still carries the risk of misjudging reversal points. Enhancements through additional filters, dynamic stops, parameter optimization etc. can improve robustness. Overall it exemplifies a sound short-term mean reversion framework worth learning from.

Source
Pine
/*backtest
start: 2022-10-22 00:00:00
end: 2022-12-14 00:00:00
period: 1d
basePeriod: 1h
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

//@version=4

// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © MakeMoneyCoESTB2020
Strategy parameters
Strategy parameters
Price Source
Aggressive = 0, Conservative = 1
Gap% between 8EMA & 20SMA
Run Strategy Trending Up, Down, or Both
SH EMA Length
MD EMA Length
SH SMA Length
LG SMA Length
SH SMA Length
From Month
From Day
From Year
Thru Month
Thru Day
Thru Year
Show Date Range
Stop Criteria: SL or SH_EMA
Profit Criteria: TGT% or MD_EMA
Trail Loss %
Stop Loss %
Take Profit %
% of SH_EMA for Stop
% of MD_EMA for Profit
Comment
All comments (0)
No data
No data
  • 1
iPhone Download
Forums
PINE Language
© 2015 - ∞ INVENTOR PTE LTD (SG)