This strategy mainly uses the crossover of two Hull Moving Averages of different timeframes to determine market trends and make long and short trades.
The strategy uses two Hull Moving Averages, one is 60 periods and the other is 175 periods. Where:
hullma is the 60-period Hull Moving Average, calculated by the wma function.
ahullma is the 175-period Hull Moving Average, calculated by the wma function.
When hullma crosses ahullma upward, a golden cross occurs, giving a long signal.
When hullma crosses ahullma downward, a death cross occurs, giving a short signal.
longCondition and shortCondition determine the long and short entry conditions respectively.
The strategy.entry function is used to execute long and short trades.
The strategy utilizes the crossover principle to capture trend changes using the crossovers between short-term and long-term moving averages, for profit.
Hull Moving Average responds faster to price changes.
Crossover principle is simple and easy to implement.
The 60- and 175-period combination captures medium-term trends.
Customizable period parameters for different markets.
Applicable for intraday and position trading.
Crossovers have some lag in signals.
More false signals from short-term MA.
Frequent crossovers may cause losses in range-bound markets.
Wrong period settings cannot capture trend changes.
Need parameter optimization for different symbols.
Risks can be mitigated by adding filters, optimizing parameters, allowing wider stops.
Test different MA combinations to find optimal periods.
Add trend indicators for signal filtering.
Optimize stop loss strategy to reduce frequent stops.
Adjust periods for different symbols.
Add machine learning to dynamically optimize parameters.
This strategy utilizes golden cross and death cross principles to determine trends using double Hull Moving Average crossovers. It is a typical short-term dual moving average system. The pros are simple logic and easy implementation, catching fast short-term trends. The cons are high false signals and lagging issues. Improvements can be made via parameter optimization, signal filtering etc. It is a worthwhile short-term trading strategy to study. The strategy can be flexibly applied for intraday and position trading across different markets. Overall, it is suitable for short-term trading and can generate good returns if used properly.
/*backtest start: 2023-09-10 00:00:00 end: 2023-10-10 00:00:00 period: 2h basePeriod: 15m exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}] */ //@version=4 strategy(title = "Hull MA", shorttitle="Junior2", overlay = true) //HULL MA 1 length = input(60, minval=1,title="HULL MA 1 LENGTH") src = input(close, title="Source") hullma = wma(2*wma(src, length/2)-wma(src, length), round(sqrt(length))) plot(hullma, color=color.green) //HULLMA 2 alength = input(175, minval=1,title="HULL MA 2 LENGTH") asrc = input(close, title="Source") ahullma = wma(2*wma(asrc, alength/2)-wma(asrc, alength), round(sqrt(alength))) plot(ahullma, color=color.green) c1up= crossover(hullma,ahullma) c1down= crossunder(hullma,ahullma) longCondition = c1up if longCondition strategy.entry("L", strategy.long) shortCondition = c1down if shortCondition strategy.entry("S", strategy.short) plot(close)