OPEN-SOURCE SCRIPT
Trend Score Stop Loss

Trend Score Indicator Guide
This indicator is designed for futures trading during RTH (Regular Trading Hours, 9:30–16:00 NY time). It’s an all-in-one bull/bear trend system with built-in stop loss logic — simple, objective, and always active.
⸻
🔹 How Trend Score Works
• The trend score is calculated only during RTH and resets at the start of each new session.
• Each candle contributes to the score as follows:
• ✅ Breaks previous high → +1
• ❌ Breaks previous low → –1
• ⚖️ Breaks both high and low → 0 (–1 + 1 cancel out)
• 💤 Breaks neither high nor low → 0
⸻
🔹 Determining the First Trend
• The first valid session trend is established when the cumulative score hits +3 or –3.
• +3 → Start of a Bull Trend
• –3 → Start of a Bear Trend
⚠️ Note: The indicator requires at least 3 candles to generate the first +3/–3 sequence.
👉 This means the first 3 minutes of the open (9:30–9:33) are ignored — a natural filter that avoids the most volatile/noisy part of the day.
⸻
🔹 Stop Loss vs. Trend Change
These are two separate events:
• Stop Loss
• A stop level is drawn at the candle that initiated the +3 or –3 trigger.
• This line is only a visual suggestion — it does not force an exit.
• Real-world stop placement depends on your own discretion, factoring in position size, volatility, and strategy.
• Hitting this level does not automatically mean the trend is over.
• Trend Change
• The trend only reverses when the opposite direction accumulates 3 points.
• Example: In a Bull trend, the system flips to Bear only when a –3 sequence occurs (and vice versa).
• A trend change can happen before or without the stop loss ever being hit.
⸻
🔹 Key Features
• ✅ Active only during RTH (9:30–16:00 NY) — no overnight distortions.
• 🔄 Auto-reset daily at the start of each session.
• 🟢🔴 Always in a trend — continuously switches between Bull and Bear.
• 🛡️ Stop loss marked visually — but final risk management is trader’s choice.
• ⏳ Avoids first 3 minutes of open — naturally filters volatility & false signals.
⸻
✨ In short:
The Trend Score Indicator transforms simple high/low breaks into a rule-based trend framework. You’ll always know if the market is in a bull or bear phase, where the suggested stop loss lies, and when a true trend reversal occurs — while still leaving risk management decisions in your hands.
⸻
For better user experience:
Deselect danger score, delta per bar, slope m10, panel label in the style tap. These are used for the calculation purpose only.
You can also change your session time to 1800 to 1600, however it may not work well in ETH session.
This indicator is designed for futures trading during RTH (Regular Trading Hours, 9:30–16:00 NY time). It’s an all-in-one bull/bear trend system with built-in stop loss logic — simple, objective, and always active.
⸻
🔹 How Trend Score Works
• The trend score is calculated only during RTH and resets at the start of each new session.
• Each candle contributes to the score as follows:
• ✅ Breaks previous high → +1
• ❌ Breaks previous low → –1
• ⚖️ Breaks both high and low → 0 (–1 + 1 cancel out)
• 💤 Breaks neither high nor low → 0
⸻
🔹 Determining the First Trend
• The first valid session trend is established when the cumulative score hits +3 or –3.
• +3 → Start of a Bull Trend
• –3 → Start of a Bear Trend
⚠️ Note: The indicator requires at least 3 candles to generate the first +3/–3 sequence.
👉 This means the first 3 minutes of the open (9:30–9:33) are ignored — a natural filter that avoids the most volatile/noisy part of the day.
⸻
🔹 Stop Loss vs. Trend Change
These are two separate events:
• Stop Loss
• A stop level is drawn at the candle that initiated the +3 or –3 trigger.
• This line is only a visual suggestion — it does not force an exit.
• Real-world stop placement depends on your own discretion, factoring in position size, volatility, and strategy.
• Hitting this level does not automatically mean the trend is over.
• Trend Change
• The trend only reverses when the opposite direction accumulates 3 points.
• Example: In a Bull trend, the system flips to Bear only when a –3 sequence occurs (and vice versa).
• A trend change can happen before or without the stop loss ever being hit.
⸻
🔹 Key Features
• ✅ Active only during RTH (9:30–16:00 NY) — no overnight distortions.
• 🔄 Auto-reset daily at the start of each session.
• 🟢🔴 Always in a trend — continuously switches between Bull and Bear.
• 🛡️ Stop loss marked visually — but final risk management is trader’s choice.
• ⏳ Avoids first 3 minutes of open — naturally filters volatility & false signals.
⸻
✨ In short:
The Trend Score Indicator transforms simple high/low breaks into a rule-based trend framework. You’ll always know if the market is in a bull or bear phase, where the suggested stop loss lies, and when a true trend reversal occurs — while still leaving risk management decisions in your hands.
⸻
For better user experience:
Deselect danger score, delta per bar, slope m10, panel label in the style tap. These are used for the calculation purpose only.
You can also change your session time to 1800 to 1600, however it may not work well in ETH session.
오픈 소스 스크립트
진정한 트레이딩뷰 정신에 따라 이 스크립트 작성자는 트레이더가 기능을 검토하고 검증할 수 있도록 오픈소스로 공개했습니다. 작성자에게 찬사를 보냅니다! 무료로 사용할 수 있지만 코드를 다시 게시할 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.
오픈 소스 스크립트
진정한 트레이딩뷰 정신에 따라 이 스크립트 작성자는 트레이더가 기능을 검토하고 검증할 수 있도록 오픈소스로 공개했습니다. 작성자에게 찬사를 보냅니다! 무료로 사용할 수 있지만 코드를 다시 게시할 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.