Type/to search

TD Sequential Dual-Direction S/R Trading Strategy

Common strategy
Created: 2024-02-06 12:13:22
Last modified: 2 years ago
1
Follow
1802
Followers

img

Overview

This strategy identifies support and resistance levels by tracking the consecutive up and down bars of prices, and combines moving averages as entry and stop loss signals to construct long and short trading strategies. The strategy can go both long and short, or only one side.

Principles

  1. S/R identification
    • When the close price is higher than the close of 4 days ago for 4 consecutive days, mark the point as a downside support
    • When the close price is lower than the close of 4 days ago for 4 consecutive days, mark the point as a upside resistance
  2. Signal generation
    • After identifying a support level, if the up bar count reaches the threshold (default 9 days), generate long signal
    • After identifying a resistance level, if the down bar count reaches the threshold (default 9 days), generate short signal
  3. MA filter and stop loss
    • Require price to cross the MA line on entry, to filter signals
    • Set stop loss to the MA line at entry

Advantages

  1. Judgment based on S/R is relatively reliable, not easily misled by short-term fluctuations
  2. Combining MA filter can reduce false signals
  3. Go both long and short to improve frequency and profit opportunities
  4. Parameters adjustable, can be optimized for different products and market situations

Risks and Solutions

  1. May suffer consecutive losses in trending markets
    • Increase MA period to reduce trade frequency
  2. Probability of wrong S/R judgement
    • Fine tune thresholds for S/R identification
  3. Stop loss may be triggered too often in whipsaw markets
    • Loosen stop loss range
    • Add trend indicator

Optimization Directions

  1. Add more technical indicators to improve robustness
    • Trend, momentum etc.
  2. Optimize S/R identification logic
    • Test impact of different parameters
  3. Parameter tuning for specific products and timeframes
    • Adjustable range varies across products
  4. Develop adaptive stop loss mechanism
    • Dynamically adjust stop loss based on market volatility

Conclusion

The strategy is relatively simple and reliable. By correctly identifying S/R levels it captures price reversal opportunities with high probability. Combining with MA ensures proper entry timing and avoids traps. Finally, the directional judgement is conservative but adaptable. Users can optimize parameters according to their market understanding and achieve even better results.

Source
Pine
/*backtest
start: 2023-01-30 00:00:00
end: 2024-02-05 00:00:00
period: 1d
basePeriod: 1h
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © GlobalMarketSignals

//@version=4
Strategy parameters
Strategy parameters
Long Only or Short Only or Both?
TD Sequential Long Price Flip
TD Sequential Short Price Flip
Long MA
Short MA
Long MA Exit Length
Short MA Exit Length
Long Trend Filter?
Short Trend Filter?
Trend MA
Trend MA Length
Profit Target On/Off
Profit Target %
Stop Loss On/Off
Stop Loss %
Comment
All comments (0)
No data
No data
  • 1
Forums
PINE Language
Get the app
iPhone Download
© 2015 - ∞ INVENTOR PTE LTD (SG)