The Dynamic Trend Tracking Reversal Strategy is a short-term quantitative trading strategy based on the JD Sequential indicator. By tracking price highs and lows in real-time, this strategy determines the current trend direction and momentum to efficiently capture market reversal points for entry and exit timing. Compared to traditional JD Sequential strategies, this strategy makes the following enhancements:
This strategy is suitable for short-term time frames such as 5-min and 15-min charts, which can effectively capture short-term price fluctuations and reversal opportunities.
The core logic of the Dynamic Trend Tracking Reversal Strategy is based on the JD Sequential indicator. By comparing the current period’s high and low prices with those of the previous two periods, this indicator determines if successive higher highs or lower lows have occurred, and generates a sequential count from 1 to 7. When the count accumulates to 7, trading signals are generated.
Specifically, the following variables are defined in the strategy:
The logic for trade signal generation is:
The stop loss logic is:
By comparing highs/lows in real-time to determine trend direction and strength, alongside count-based timing for entry, this strategy can effectively capture short-term reversal opportunities. Stop loss lines are also configured to control risks.
Compared to traditional JD Sequential strategies, the Dynamic Trend Tracking Reversal Strategy has the following advantages:
The key advantage of this strategy is its swift response, which can effectively capture large fluctuations caused by short-term events. Also, algorithmic signal generation and stop loss mechanization can reduce emotional interference from traders, improving consistency.
The Dynamic Trend Tracking Reversal Strategy also carries some risks:
To mitigate the above risks, the strategy can be optimized in the following aspects:
There is ample room for the Dynamic Trend Tracking Reversal Strategy to be further optimized, mainly in the following directions:
Multi-timeframe combinations. Determine the major trend direction on higher timeframes to avoid trading against it.
Combinations with other indicators. Incorporate volatility metrics, volume data etc. to improve signal quality.
Machine learning for additional validation. Utilize AI/ML algorithms as auxiliary judgment on trade signals to reduce erroneous trades.
Parameter tuning. Optimize parameters like count periods, trading sessions, position sizing etc. to fit different market conditions.
Expand risk control mechanisms. Introduce more sophisticated risk management techniques like adaptive stops, position sizing etc. to further restrict risks.
Strategy evaluation through backtesting. Expand sample sizes and timeframes for backtests to gauge parameter robustness.
The Dynamic Trend Tracking Reversal Strategy captures short-term reversal opportunities through real-time comparison of price highs and lows to determine trend direction and strength, alongside the 7-count rules within the JD Sequential indicator for trade timing. Compared to traditional JD strategies, this strategy makes enhancements like using highs/lows instead of close prices, shortened count periods, additional stop loss mechanisms etc., enabling faster signal generation.
The key strength of this strategy lies in its swift response suitable for short-term reversal trading. At the same time, risks like high trading frequencies and aggressive stops do exist. Future optimization directions include parameter tuning, enhancement of risk controls, multi-timeframe combinations etc. Through continual optimizations and iterations, this strategy has the potential to become a powerful tool for efficiently capturing short-term reversal signals.
/*backtest start: 2023-12-16 00:00:00 end: 2024-01-15 00:00:00 period: 1h basePeriod: 15m exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}] */ // @NeoButane 7 Dec. 2018 // JD Aggressive Sequential Setup // Not based off official Tom DeMarke documentation. As such, I have named the indicator JD instead oF TD to reflect this, and as a joke. // // Difference vs. TD Sequential: faster trade exits and a unique entry. Made for low timeframes. // - Highs or lows are compared instead of close. // - Mirrors only the Setup aspect of TD Sequential (1-9, not to 13) // - Count maxes out at 7 instead of 9. Also part of the joke if I'm going to be honest here // v1 - Release - Made as a strategy, 7 count // . S/R on 7 count // .. Entry on 7 count // ... Exit on 5 count or S/R cross //@version=3 title = "JD Aggressive Sequential Setup" vers = " 1.0 [NeoButane]" total = title + vers strategy(total, total, 1, 0) xx = input(true, "Include S/R Crosses Into Stop Loss") show_sp = input(true, "Show Count 1-4") sp_ct = 0 inc_sp(x) => nz(x) == 7 ? 1 : nz(x) + 1 sp_up = high > high[2] sp_dn = low < low[2] sp_col = sp_up ? green : red sp_comCol = sp_up ? red : green sp_ct := sp_up ? (nz(sp_up[1]) and sp_col == sp_col[1] ? inc_sp(sp_ct[1]) : 1) : sp_dn ? (nz(sp_dn[1]) and sp_col == sp_col[1] ? inc_sp(sp_ct[1]) : 1) : na sp_com = sp_ct == 7 sp_sr = valuewhen(sp_ct == 5, close, 0) sp_usr = valuewhen(sp_ct == 7 and sp_up, sma(hlc3, 2), 0) sp_usr := sp_usr <= sp_usr[1] * 1.0042 and sp_usr >= sp_usr[1] * 0.9958 ? sp_usr[1] : sp_usr sp_dsr = valuewhen(sp_ct == 7 and sp_dn, sma(hlc3, 2), 0) sp_dsr := sp_dsr <= sp_dsr[1] * 1.0042 and sp_dsr >= sp_dsr[1] * 0.9958 ? sp_dsr[1] : sp_dsr locc = location.abovebar plotchar(show_sp and sp_ct == 1, 'Setup: 1', '1', locc, sp_col, editable=false) plotchar(show_sp and sp_ct == 2, 'Setup: 2', '2', locc, sp_col, editable=false) plotchar(show_sp and sp_ct == 3, 'Setup: 3', '3', locc, sp_col, editable=false) plotchar(show_sp and sp_ct == 4, 'Setup: 4', '4', locc, sp_col, editable=false) plotshape(sp_ct == 5, 'Setup: 5', shape.xcross, locc, sp_comCol, 0, 0, '5', sp_col) plotshape(sp_ct == 6, 'Setup: 6', shape.circle, locc, sp_comCol, 0, 0, '6', sp_col) plotshape(sp_ct == 7, 'Setup: 7', shape.circle, locc, sp_comCol, 0, 0, '7', sp_col) // plot(sp_sr, "5 Count Support/Resistance", gray, 2, 6) plot(sp_usr, "7 Count Resistance", maroon, 2, 6) plot(sp_dsr, "7 Count Support", green, 2, 6) long = (sp_com and sp_dn) short = (sp_com and sp_up) sl_l = xx ? crossunder(close, sp_dsr) or (sp_ct == 5 and sp_up) or short : (sp_ct == 5 and sp_up) or short sl_s = xx ? crossover(close, sp_usr) or (sp_ct == 5 and sp_dn) or long : (sp_ct == 5 and sp_dn) or long strategy.entry('L', 1, when = long) strategy.close('L', when = sl_l) strategy.entry('S', 0, when = short) strategy.close('S', when = sl_s)