Gap Opening Strategy
This strategy judges market trend direction by calculating moving average and price difference to determine long entry, avoiding frequent opening during shocks.
Strategy Overview
- Use 20-period simple moving average to determine overall market trend
- Use 3-period high-low price difference to judge recent price fluctuation
- Go long when price is above MA and difference is greater than 20-period average
- Exit when price drops below 98% of entry price
Strategy Principle
This strategy combines MA and price fluctuation to capture upside opportunities during trends.
When price breaks above MA, it indicates an upward trend. If recent 3-period HL difference is larger than 20-period average, it suggests increased fluctuation and potential for a big rise for entry.
After opening, set a fixed percentage stop loss price. Exit when price drops below to control downside risk.
Advantages
- Avoid frequent opening during shocks by judging both trend and volatility
- More solid breakout signal using price difference
- Stop loss helps control risk
Risks
- Improper parameter tuning leads to missing trades
- Too wide stop loss brings large loss
- Breakout could be false, needs more factors
Risk Solutions:
- Optimize parameters for best combination
- Use multiple stops or adaptive stops per market volatility
- Add indicators like volume to confirm signal reliability
Improvement Direction
- Add volatility indicators like BB for better entry
- Analyze volume to confirm entry signals
- Judge overall market using stock index to avoid bad trades
- Use moving/trailing stop to lock in more profit
Conclusion
This strategy effectively filters out shocks and volatility before entering in trending markets with simple but useful indicators, avoiding unnecessary trades. Also, risk is well controlled to limit losses. Further optimizations can lead to even better results.
/*backtest
start: 2023-02-21 00:00:00
end: 2024-02-27 00:00:00
period: 1d
basePeriod: 1h
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=5
strategy("Estrategia de Diferencia HL y MA para Criptomonedas", shorttitle="HL MA Crypto Strategy-Ortiz", overlay=true)
// Definir longitud de MA y HL- 1

