OPEN-SOURCE SCRIPT
HTF Candle Direction Strategy V1

🔹 Title
HTF Candle Direction Strategy V1
🔹 Short Description
Higher Timeframe (HTF) bias-based strategy with optional EMA & volume filters and controlled daily execution.
🔹 Full Description
📌 Overview
HTF Candle Direction Strategy V1 is a simple yet powerful trend-following strategy that trades in the direction of a selected Higher Timeframe (HTF) candle.
The core idea is straightforward:
If the HTF candle is bullish → look for BUY trades
If the HTF candle is bearish → look for SELL trades
This helps traders align with the broader market trend while executing trades on lower timeframes.
⚙️ How It Works
The script fetches HTF Open and Close prices
Determines directional bias:
Bullish Bias → HTF Close > HTF Open
Bearish Bias → HTF Close < HTF Open
Trades are executed only when:
Signals are enabled
Selected direction (Buy/Sell) is enabled
Filters (if enabled) are satisfied
Only one trade per day is allowed
🔍 Features
✅ Higher Timeframe Bias Trading
Trade in alignment with HTF trend
Works on any timeframe combination
✅ Lookahead Mode (Backtesting vs Real Trading)
ON → Faster signals but repaints
OFF → Realistic, non-repainting behavior
✅ EMA Filter (Optional)
Confirms trend using EMA
Buy only above EMA
Sell only below EMA
✅ Volume Filter (Optional)
Trades only when volume is strong
Helps avoid weak market conditions
✅ One Trade Per Day Logic
Prevents overtrading
Keeps strategy disciplined
✅ Built-in Alerts
BUY & SELL alerts included
Ready for automation
✅ Live Dashboard
Displays:
HTF Bias
Lookahead status
EMA filter status
Volume filter status
📊 Dashboard Information
The dashboard (top-right) provides real-time status:
HTF Bias → Current market direction
Lookahead → ON (Repainting) / OFF (Safe)
EMA Filter → Enabled / Disabled
Volume Filter → Enabled / Disabled
⚠️ Important Notes
Lookahead ON = Repainting
Use only for backtesting or analysis
For real trading, always use:
👉 Lookahead OFF
Strategy takes only one trade per day, so performance depends on HTF accuracy
🎯 Best Use Cases
Intraday trading with HTF confirmation
Trend-following strategies
Index, Forex, Crypto markets
Scalping with higher timeframe bias
💡 Recommended Settings
HTF: 4H / Daily
EMA: 50 or 200
Lookahead: OFF (for live trading)
Volume Filter: Optional
🔔 Alerts
BUY Signal → HTF Bullish + filters satisfied
SELL Signal → HTF Bearish + filters satisfied
🚀 Final Notes
This strategy is designed for simplicity, clarity, and disciplined execution.
It avoids overtrading and focuses on high-probability directional setups.
⚠️ Disclaimer
This script is provided for educational and informational purposes only and should not be considered financial advice.
Trading in financial markets involves significant risk, and you may lose all or part of your capital. Past performance of this strategy does not guarantee future results.
This strategy uses higher timeframe data and optional lookahead logic. When lookahead is enabled, signals may repaint, meaning results shown on historical data may differ from real-time performance.
Users are strongly advised to:
Test the strategy on demo accounts before using real capital
Use proper risk management
Understand how the strategy works before trading
The author is not responsible for any financial losses or damages resulting from the use of this script.
HTF Candle Direction Strategy V1
🔹 Short Description
Higher Timeframe (HTF) bias-based strategy with optional EMA & volume filters and controlled daily execution.
🔹 Full Description
📌 Overview
HTF Candle Direction Strategy V1 is a simple yet powerful trend-following strategy that trades in the direction of a selected Higher Timeframe (HTF) candle.
The core idea is straightforward:
If the HTF candle is bullish → look for BUY trades
If the HTF candle is bearish → look for SELL trades
This helps traders align with the broader market trend while executing trades on lower timeframes.
⚙️ How It Works
The script fetches HTF Open and Close prices
Determines directional bias:
Bullish Bias → HTF Close > HTF Open
Bearish Bias → HTF Close < HTF Open
Trades are executed only when:
Signals are enabled
Selected direction (Buy/Sell) is enabled
Filters (if enabled) are satisfied
Only one trade per day is allowed
🔍 Features
✅ Higher Timeframe Bias Trading
Trade in alignment with HTF trend
Works on any timeframe combination
✅ Lookahead Mode (Backtesting vs Real Trading)
ON → Faster signals but repaints
OFF → Realistic, non-repainting behavior
✅ EMA Filter (Optional)
Confirms trend using EMA
Buy only above EMA
Sell only below EMA
✅ Volume Filter (Optional)
Trades only when volume is strong
Helps avoid weak market conditions
✅ One Trade Per Day Logic
Prevents overtrading
Keeps strategy disciplined
✅ Built-in Alerts
BUY & SELL alerts included
Ready for automation
✅ Live Dashboard
Displays:
HTF Bias
Lookahead status
EMA filter status
Volume filter status
📊 Dashboard Information
The dashboard (top-right) provides real-time status:
HTF Bias → Current market direction
Lookahead → ON (Repainting) / OFF (Safe)
EMA Filter → Enabled / Disabled
Volume Filter → Enabled / Disabled
⚠️ Important Notes
Lookahead ON = Repainting
Use only for backtesting or analysis
For real trading, always use:
👉 Lookahead OFF
Strategy takes only one trade per day, so performance depends on HTF accuracy
🎯 Best Use Cases
Intraday trading with HTF confirmation
Trend-following strategies
Index, Forex, Crypto markets
Scalping with higher timeframe bias
💡 Recommended Settings
HTF: 4H / Daily
EMA: 50 or 200
Lookahead: OFF (for live trading)
Volume Filter: Optional
🔔 Alerts
BUY Signal → HTF Bullish + filters satisfied
SELL Signal → HTF Bearish + filters satisfied
🚀 Final Notes
This strategy is designed for simplicity, clarity, and disciplined execution.
It avoids overtrading and focuses on high-probability directional setups.
⚠️ Disclaimer
This script is provided for educational and informational purposes only and should not be considered financial advice.
Trading in financial markets involves significant risk, and you may lose all or part of your capital. Past performance of this strategy does not guarantee future results.
This strategy uses higher timeframe data and optional lookahead logic. When lookahead is enabled, signals may repaint, meaning results shown on historical data may differ from real-time performance.
Users are strongly advised to:
Test the strategy on demo accounts before using real capital
Use proper risk management
Understand how the strategy works before trading
The author is not responsible for any financial losses or damages resulting from the use of this script.
Open-source Skript
Ganz im Sinne von TradingView hat dieser Autor sein/ihr Script als Open-Source veröffentlicht. Auf diese Weise können nun auch andere Trader das Script rezensieren und die Funktionalität überprüfen. Vielen Dank an den Autor! Sie können das Script kostenlos verwenden, aber eine Wiederveröffentlichung des Codes unterliegt unseren Hausregeln.
Haftungsausschluss
Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.
Open-source Skript
Ganz im Sinne von TradingView hat dieser Autor sein/ihr Script als Open-Source veröffentlicht. Auf diese Weise können nun auch andere Trader das Script rezensieren und die Funktionalität überprüfen. Vielen Dank an den Autor! Sie können das Script kostenlos verwenden, aber eine Wiederveröffentlichung des Codes unterliegt unseren Hausregeln.
Haftungsausschluss
Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.