OPEN-SOURCE SCRIPT
Strategy with DI+/DI-, ADX, RSI, MACD, EMA + Time Stop [EXP. 1]

Strategy Overview
This is an experimental trend-following strategy combining directional movement indicators, momentum filters, and time-based exits. Built for low timeframes like BTCUSDT 5m, it aims to detect clean directional setups while managing risk tightly.
Indicator Components
• DI+/DI- + ADX – Confirms trend direction and strength
• RSI (14) – Momentum filter (entries only if RSI > 55 or < 45)
• MACD Histogram – Confirms momentum shift in signal direction
• Candle Body % Filter – Screens for strong price commitment bars
• EMA 600 & EMA 2400 – Defines long-term trend alignment
• Time-Based Stop – Closes trade if it doesn’t move 0.75% in 85 bars
• Reward:Risk – 1% stop-loss, 7.5:1 reward-to-risk
• One Trade per EMA Cross – Only trades first valid signal per trend shift
Entry Logic
Long Entry:
• DI+ crosses above DI−
• RSI > 55
• MACD histogram > 0
• Strong bullish candle
• EMA600 > EMA2400
• Occurs within 25 bars of an EMA crossover
Short Entry:
• DI+ crosses below DI−
• RSI < 45
• MACD histogram < 0
• Strong bearish candle
• EMA2400 > EMA600
• Occurs within 25 bars of an EMA crossover
Exit Logic
• Stop-loss: 1% from entry
• Take-profit: 7.5x risk
• Time-stop: Trade closed if price doesn’t move 0.75% in 85 bars
Testing Parameters
• Initial Capital: $10,000
• Commission: 0.04% per trade
• Timeframe: 5-minute
• Tested on: BTCUSDT
• ⚠️ Early-stage strategy — trade count may be low depending on market context. This is shared for educational use and community feedback.
Notes
• This script is experimental and educational
• Please forward-test in a demo environment before using it live
• Open-source for learning and improvement — contributions welcome!
This is an experimental trend-following strategy combining directional movement indicators, momentum filters, and time-based exits. Built for low timeframes like BTCUSDT 5m, it aims to detect clean directional setups while managing risk tightly.
Indicator Components
• DI+/DI- + ADX – Confirms trend direction and strength
• RSI (14) – Momentum filter (entries only if RSI > 55 or < 45)
• MACD Histogram – Confirms momentum shift in signal direction
• Candle Body % Filter – Screens for strong price commitment bars
• EMA 600 & EMA 2400 – Defines long-term trend alignment
• Time-Based Stop – Closes trade if it doesn’t move 0.75% in 85 bars
• Reward:Risk – 1% stop-loss, 7.5:1 reward-to-risk
• One Trade per EMA Cross – Only trades first valid signal per trend shift
Entry Logic
Long Entry:
• DI+ crosses above DI−
• RSI > 55
• MACD histogram > 0
• Strong bullish candle
• EMA600 > EMA2400
• Occurs within 25 bars of an EMA crossover
Short Entry:
• DI+ crosses below DI−
• RSI < 45
• MACD histogram < 0
• Strong bearish candle
• EMA2400 > EMA600
• Occurs within 25 bars of an EMA crossover
Exit Logic
• Stop-loss: 1% from entry
• Take-profit: 7.5x risk
• Time-stop: Trade closed if price doesn’t move 0.75% in 85 bars
Testing Parameters
• Initial Capital: $10,000
• Commission: 0.04% per trade
• Timeframe: 5-minute
• Tested on: BTCUSDT
• ⚠️ Early-stage strategy — trade count may be low depending on market context. This is shared for educational use and community feedback.
Notes
• This script is experimental and educational
• Please forward-test in a demo environment before using it live
• Open-source for learning and improvement — contributions welcome!
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.