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. קרא עוד בתנאים וההגבלות.
סקריפט קוד פתוח
ברוח TradingView אמיתית, היוצר של הסקריפט הזה הפך אותו לקוד פתוח, כך שסוחרים יכולים לבדוק ולאמת את הפונקציונליות שלו. כל הכבוד למחבר! למרות שאתה יכול להשתמש בו בחינם, זכור שפרסום מחדש של הקוד כפוף לכללי הבית שלנו.
כתב ויתור
המידע והפרסומים אינם אמורים להיות, ואינם מהווים, עצות פיננסיות, השקעות, מסחר או סוגים אחרים של עצות או המלצות שסופקו או מאושרים על ידי TradingView. קרא עוד בתנאים וההגבלות.