This strategy is a trading strategy that utilizes multiple timeframes. It mainly uses the long-term timeframe to determine the trend direction, medium-term timeframe to determine momentum direction, and short-term timeframe to locate specific entry points. The overall idea is to make decisions based on trend, momentum and entry timing in three different time spans.
The strategy is implemented mainly through the following:
Define different timeframes
Determine long-term trend
Determine medium-term momentum
Locate entry points
Exit points
In summary, this strategy makes full use of information across timeframes, judging trend and timing from different dimensions, which can effectively filter false breakouts and select high probability entry points along the trend.
The advantages of this strategy include:
The multiple timeframe design is scientific and meticulous, allowing for more accurate market trend judgment and avoiding being misled by short-term market noise.
Comprehensive conditions considering trend, momentum and entry timing help filter out many false signals.
Using Stoch to determine medium-term momentum is very precise and helps capture true market reversals.
The strict entry criteria avoid most false breakouts from price spikes.
Defined stop loss exit points effectively control risk for each trade.
Applicable to various market environments without being constrained by specific market conditions.
There is room for optimizing capital management, such as fixed stop loss percentage, dynamic position sizing etc.
There are also some risks to note for this strategy:
In ranging markets, there may be multiple stop loss hits.
Trend changes may not be captured in time, leading to improper trades.
Relying solely on Stoch for momentum judgment has limitations.
The strict entry criteria may cause missing out some trends.
The profit potential is relatively limited, unable to capture huge trends.
Some ways to mitigate the risks:
Fine tune parameters to lower error rates.
Add trend indicators to establish combined judgment.
Incorporate more indicators like MACD for momentum judgment.
Optimize stop loss to use trailing stop etc.
Promptly adjust stop loss and position size when major trend changes.
Some ways to optimize the strategy:
Parameter optimization such as MA periods, Stoch settings to improve signal accuracy.
Add more indicators such as MACD, Bollinger Bands for enhanced judgment.
Optimize entry criteria, allow more trades at acceptable risk levels.
Use trailing stop loss or ATR-based stops.
Actively adjust position sizing when major trend changes.
Utilize machine learning to auto optimize parameters and rules.
Consider fundamentals, use key data releases to further confirm signals.
Test effectiveness across different products like forex, metals etc.
In summary, the core idea of this multiple timeframe trend strategy is to make decisions based on long-, medium- and short-term dimensions. The advantages lie in strict conditions and controllable risks, but parameters and rules need optimization for specific markets. Going forward, this strategy can be further enhanced by incorporating more indicators, optimizing stops, adding machine learning etc.
/*backtest start: 2023-10-15 00:00:00 end: 2023-10-22 00:00:00 period: 1m basePeriod: 1m exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}] */ //@version=2 strategy("TUX MTF", overlay=true) // MULTIPLE TIME FRAME STRATEGY // LONG TERM --- TREND // MED TERM --- MOMENTUM // SHORT TERM --- ENTRY // ENTRY POSITION TIMEFRAME entry_position = input(title="Entry timeframe (minutes)", defval=5, minval=1, maxval=1440) med_term = entry_position * 4 long_term = med_term * 4 // GLOBAL VARIABLES ma_trend = input(title="Moving Average Period (Trend)", defval=50, minval=5, maxval=200) // RSI length = input(title="Stoch Length", defval=18, minval=5, maxval=200) OverBought = input(title="Stoch OB", defval=80, minval=60, maxval=100) OverSold = input(title="Stoch OS", defval=20, minval=5, maxval=40) smoothK = input(title="Stoch SmoothK", defval=14, minval=1, maxval=40) smoothD = input(title="Stoch SmoothD", defval=14, minval=1, maxval=40) maSm = input(title="Moving Avg SM", defval=7, minval=5, maxval=50) maMed = input(title="Moving Avg MD", defval=21, minval=13, maxval=200) // LONG TERM TREND long_term_trend = request.security(syminfo.ticker, tostring(long_term), sma(close,ma_trend)) > request.security(syminfo.ticker, tostring(long_term), close) plot(request.security(syminfo.ticker, tostring(long_term), sma(close,ma_trend)), title="Long Term MA", linewidth=2) // FALSE = BEAR // TRUE = BULL // MED TERM MOMENTUM k = request.security(syminfo.ticker, tostring(med_term), sma(stoch(close, high, low, length), smoothK)) d = request.security(syminfo.ticker, tostring(med_term), sma(k, smoothD)) os = k >= OverBought or d >= OverBought ob = k <= OverSold or d <= OverSold // SHORT TERM MA X OVER bull_entry = long_term_trend == false and os == false and ob == false and k > d and request.security(syminfo.ticker, tostring(entry_position), crossover(sma(close, maSm), sma(close, maMed))) bear_entry = long_term_trend == true and os == false and ob == false and k < d and request.security(syminfo.ticker, tostring(entry_position), crossunder(sma(close, maSm), sma(close, maMed))) bull_exit = crossunder(k,d) bear_exit = crossover(k,d) if (bull_entry) strategy.entry("Long", strategy.long) if (bear_entry) strategy.entry("Short", strategy.short) strategy.close("Long", when = bull_exit == true) strategy.close("Short", when = bear_exit == true)