OPEN-SOURCE SCRIPT
تم تحديثه Setup Quality Scorecard [AGPro Series]

Setup Quality Scorecard [AGPro Series]
Setup Quality Scorecard grades every bar on a transparent 0-100 scale across ten independent confluence dimensions. Instead of another signal generator, it is a quality filter: it tells you how strong the current setup is, which factors are firing, and how often similar past setups have followed through. Works on any symbol, any timeframe.
🔹 OVERVIEW
Every trader has the same question before pulling the trigger: "Is this setup actually good, or am I forcing it?" Setup Quality Scorecard answers that question with a single auditable number. The composite score blends ten orthogonal factors — trend, momentum, volume, volatility, structure, S/R proximity, divergence, candle quality, session context, and higher-timeframe alignment — into a weighted 0-100 quality rating. Bars scoring above the A-Tier threshold are marked with support/resistance-style zones on the chart, so high-quality setup regions stay visible even as the market moves on.
🔹 UNIQUE EDGE
Most quality indicators hide their internals behind a black-box algorithm. This one is fully transparent. Every factor exposes its own 0-10 score in the panel, every factor weight is user-adjustable, and every historical signal is evaluated against a forward-looking hit-rate test. There are no secret filters, no proprietary confidence bands, and no cherry-picked backtest. If a setup scores 87, you can see exactly which factors contributed and which did not.
🔹 METHODOLOGY
Each of the ten factors is computed independently on the current bar and normalized to a 0-10 scale:
1. Trend Alignment — EMA 20/50/200 stack plus slope confirmation
2. Momentum — RSI zone position combined with 3-bar RSI delta
3. Volume Context — relative volume versus 20-period SMA, calibrated for real-world distribution
4. Volatility Regime — ATR percentile over the last 100 bars, favoring mid-range regimes
5. Structure — HH/HL or LH/LL confirmation via recent pivots
6. S/R Proximity — ATR-normalized distance to the nearest pivot level
7. Divergence — price-versus-RSI regular divergence captured at pivot time
8. Candle Quality — body-to-range ratio and wick balance
9. Session Context — active trading session weighting (London/NY overlap prioritized)
10. HTF Agreement — graduated higher-timeframe alignment scoring (full stack, partial stack, opposed regimes)
The ten factor scores are weighted by user-adjustable coefficients, summed, and normalized to produce the final 0-100 composite. Tier labels (S / A / B / C / D) are assigned against user-configurable thresholds.
🔹 SIGNALS AND ALERTS
When a bar crosses into A-Tier or higher, a zone is drawn using support/resistance-style geometry (body plus a small ATR cushion). Zones merge automatically when adjacent qualifying setups share the same directional bias, preventing chart clutter. Each zone is labeled with its tier and score in compact A·83 format, with a dotted leader line connecting the label to the zone edge.
Four built-in alert conditions are exposed:
- S-Tier Setup Detected (score crosses the S-Tier threshold)
- A-Tier Setup Detected (score crosses the A-Tier threshold)
- New Bullish Quality Setup (first A-tier bullish bar in a run)
- New Bearish Quality Setup (first A-tier bearish bar in a run)
🔹 KEY INPUTS
- General: Higher timeframe reference, rolling history window, forward evaluation bars
- Thresholds: S / A / B / C tier cutoffs, fully adjustable
- Factor Weights: ten independent sliders, 0.0 to 2.0, tune the scorer to your style
- Zones: adaptive extend (auto or manual), merge window, max height cap in ATR units, maximum age
- Labels: on-chart label mode (A-Tier only, S-Tier only, off), size presets
- Panel: position, size, factor breakdown toggle
🔹 HOW TO USE
Start with defaults and observe for a full session on your chart. Trend traders should raise the Trend and HTF Align weights. Reversal traders should raise Divergence, Structure, and S/R Proximity. Use the Active count in the panel as a quick filter: fewer than three factors above seven generally means a weak setup regardless of composite score. Use the hit-rate number to sanity-check whether your current configuration is performing on this asset and timeframe — if it is below 50 percent on a large sample, revisit your weight assignments.
🔹 LIMITATIONS AND TRANSPARENCY
The hit-rate metric is backward-looking. It measures how often past A-tier signals produced a one-ATR directional move within the next N bars. It is not a forecast of future performance. A hit rate with fewer than twenty signals is flagged with an info marker because the sample size is not yet statistically meaningful. Factor definitions are static — they do not adapt to regime changes automatically. Session weighting assumes standard crypto and equity session times in UTC; adjust if you are trading exotic hours. The script uses pivot-based structure, which lags by the pivot length on the right edge of the chart (a standard trade-off for noise suppression).
🔹 RISK DISCLOSURE
This indicator is an analytical tool, not financial advice. It does not predict future price movements. A high quality score does not guarantee a winning trade. Past performance of any displayed signal does not indicate future results. Always use proper risk management and position sizing. Never trade with capital you cannot afford to lose.
Setup Quality Scorecard grades every bar on a transparent 0-100 scale across ten independent confluence dimensions. Instead of another signal generator, it is a quality filter: it tells you how strong the current setup is, which factors are firing, and how often similar past setups have followed through. Works on any symbol, any timeframe.
🔹 OVERVIEW
Every trader has the same question before pulling the trigger: "Is this setup actually good, or am I forcing it?" Setup Quality Scorecard answers that question with a single auditable number. The composite score blends ten orthogonal factors — trend, momentum, volume, volatility, structure, S/R proximity, divergence, candle quality, session context, and higher-timeframe alignment — into a weighted 0-100 quality rating. Bars scoring above the A-Tier threshold are marked with support/resistance-style zones on the chart, so high-quality setup regions stay visible even as the market moves on.
🔹 UNIQUE EDGE
Most quality indicators hide their internals behind a black-box algorithm. This one is fully transparent. Every factor exposes its own 0-10 score in the panel, every factor weight is user-adjustable, and every historical signal is evaluated against a forward-looking hit-rate test. There are no secret filters, no proprietary confidence bands, and no cherry-picked backtest. If a setup scores 87, you can see exactly which factors contributed and which did not.
🔹 METHODOLOGY
Each of the ten factors is computed independently on the current bar and normalized to a 0-10 scale:
1. Trend Alignment — EMA 20/50/200 stack plus slope confirmation
2. Momentum — RSI zone position combined with 3-bar RSI delta
3. Volume Context — relative volume versus 20-period SMA, calibrated for real-world distribution
4. Volatility Regime — ATR percentile over the last 100 bars, favoring mid-range regimes
5. Structure — HH/HL or LH/LL confirmation via recent pivots
6. S/R Proximity — ATR-normalized distance to the nearest pivot level
7. Divergence — price-versus-RSI regular divergence captured at pivot time
8. Candle Quality — body-to-range ratio and wick balance
9. Session Context — active trading session weighting (London/NY overlap prioritized)
10. HTF Agreement — graduated higher-timeframe alignment scoring (full stack, partial stack, opposed regimes)
The ten factor scores are weighted by user-adjustable coefficients, summed, and normalized to produce the final 0-100 composite. Tier labels (S / A / B / C / D) are assigned against user-configurable thresholds.
🔹 SIGNALS AND ALERTS
When a bar crosses into A-Tier or higher, a zone is drawn using support/resistance-style geometry (body plus a small ATR cushion). Zones merge automatically when adjacent qualifying setups share the same directional bias, preventing chart clutter. Each zone is labeled with its tier and score in compact A·83 format, with a dotted leader line connecting the label to the zone edge.
Four built-in alert conditions are exposed:
- S-Tier Setup Detected (score crosses the S-Tier threshold)
- A-Tier Setup Detected (score crosses the A-Tier threshold)
- New Bullish Quality Setup (first A-tier bullish bar in a run)
- New Bearish Quality Setup (first A-tier bearish bar in a run)
🔹 KEY INPUTS
- General: Higher timeframe reference, rolling history window, forward evaluation bars
- Thresholds: S / A / B / C tier cutoffs, fully adjustable
- Factor Weights: ten independent sliders, 0.0 to 2.0, tune the scorer to your style
- Zones: adaptive extend (auto or manual), merge window, max height cap in ATR units, maximum age
- Labels: on-chart label mode (A-Tier only, S-Tier only, off), size presets
- Panel: position, size, factor breakdown toggle
🔹 HOW TO USE
Start with defaults and observe for a full session on your chart. Trend traders should raise the Trend and HTF Align weights. Reversal traders should raise Divergence, Structure, and S/R Proximity. Use the Active count in the panel as a quick filter: fewer than three factors above seven generally means a weak setup regardless of composite score. Use the hit-rate number to sanity-check whether your current configuration is performing on this asset and timeframe — if it is below 50 percent on a large sample, revisit your weight assignments.
🔹 LIMITATIONS AND TRANSPARENCY
The hit-rate metric is backward-looking. It measures how often past A-tier signals produced a one-ATR directional move within the next N bars. It is not a forecast of future performance. A hit rate with fewer than twenty signals is flagged with an info marker because the sample size is not yet statistically meaningful. Factor definitions are static — they do not adapt to regime changes automatically. Session weighting assumes standard crypto and equity session times in UTC; adjust if you are trading exotic hours. The script uses pivot-based structure, which lags by the pivot length on the right edge of the chart (a standard trade-off for noise suppression).
🔹 RISK DISCLOSURE
This indicator is an analytical tool, not financial advice. It does not predict future price movements. A high quality score does not guarantee a winning trade. Past performance of any displayed signal does not indicate future results. Always use proper risk management and position sizing. Never trade with capital you cannot afford to lose.
ملاحظات الأخبار
UPDATE NOTES - v2.0This update focuses on chart-first readiness, risk clarity, panel structure, and public-release usability.
The core purpose of Setup Quality Scorecard remains unchanged.
This release improves how the existing setup-quality logic is presented, organized, and interpreted on the chart.
This script continues to function as an analytical and visualization tool.
It does not attempt to predict price direction or provide guaranteed outcomes.
------------------------
What Changed
------------------------
* Rebuilt the public Scorecard into a clearer readiness engine.
The script now answers whether the current setup is READY, MONITOR, WAIT, BLOCKED, or INVALIDATED.
* Added a 0-100 readiness model around five practical components.
The scoring now highlights Bias, Location, Momentum, Risk, and Target Room instead of leaving the user with only a broad factor grid.
* Added active risk and target-room planning references.
The script maps an invalidation edge, setup state rail, and target-room guide so the score is tied to actionable context.
* Added optional compact checklist markers.
Checklist context can be enabled from settings, while the publication default stays focused on the main READY and MONITOR decision labels.
* Refined the publication preset after screenshot review.
Blocked, checklist, and follow-through labels are optional and hidden by default, while default label spacing is wider for a cleaner first-load chart.
* Tightened the final screenshot preset.
The default event cooldown and retained label count were adjusted so the chart keeps a moderate label presence without repeating the same state too often.
* Preserved the Setup Quality Scorecard identity.
This update does not expose complete paid-suite logic and does not reposition the script as a full planner or automated trading system.
------------------------
Visual Improvements
------------------------
* Added a centered readiness pocket with state and score text.
* Improved chart readability by separating setup state, invalidation, and target-room references.
* Reduced visual clutter with cooldown, max-visible label, and sparse checklist controls.
* Adjusted label placement with ATR-based offsets so labels are less likely to be buried inside candles.
------------------------
Interface & Usability
------------------------
* Updated the panel to the AGPro standard merged blue first row.
* Added panel visibility, location, theme, and font-size controls.
* Added label font-size controls with Normal as the default.
* Simplified the panel into five decision rows: Bias, Location, Momentum, Risk, and Readiness.
------------------------
Behavior Notes
------------------------
This update changes the presentation layer and decision framing of the existing scorecard.
The goal is to make setup quality easier to interpret from the chart without converting the script into a buy/sell signal system.
Alerts remain attention markers for review states, invalidation, and follow-through context.
------------------------
Limitations Reminder
------------------------
The script remains a rule-based analytical tool.
Market conditions such as volatility, liquidity, and timeframe differences may affect how readiness states appear.
Outputs should always be interpreted within broader market context.
------------------------
Risk Reminder
------------------------
This script is for educational and analytical purposes only.
It does not provide financial advice or guaranteed trading outcomes.
Users remain responsible for their own decisions.
ملاحظات الأخبار
🔧 UPDATE NOTES - v2.1This update focuses on readability, decision clarity, and adding an honest
follow-through track record to the panel.
The core purpose of the script remains unchanged.
This release improves how the existing readiness logic is presented, organized,
and interpreted on the chart.
This script continues to function as an analytical and visualization tool.
It does not attempt to predict price direction or provide guaranteed outcomes.
------------------------
What Changed
------------------------
• Readiness pocket now uses a solid centered badge
The active pocket no longer prints plain text directly over a transparent box.
The state and score are shown on a single opaque, centered badge that stays
readable on every symbol, theme, and zoom level.
• Added a stop-aware Setup Proof row
The panel now tracks how often a readiness event (READY or MONITOR) is followed
by setup-side movement reaching a symmetric ATR distance before an equal adverse
move. It is measured only on confirmed bars, uses one open window at a time,
shows "Building (n)" until enough samples exist, and leaves timed-out windows
uncounted. This is a transparency metric, not a performance promise.
• High-contrast label text
All chart labels and the pocket badge now compute their text color from the
background brightness, so MONITOR, READY, FOLLOW, and INVALID labels stay
crisp on both light and dark fills.
• Decision-colored panel cells
The Readiness and Setup Proof rows are now filled with their state color for
faster first-glance reading of the current decision and its track record.
• Hardened volatility handling
The ATR baseline now falls back to true range before the minimum tick, keeping
risk distance, target room, and label spacing stable on the very first bars and
on thin symbols.
------------------------
Visual Improvements
------------------------
• Improved chart readability by giving the readiness pocket a single solid,
centered state badge instead of floating text on a transparent box.
• Reduced visual clutter by separating overlapping event labels with controlled
vertical spacing so READY, MONITOR, and INVALID markers do not stack.
• Refined visual hierarchy so the active state, score, and risk stand out more
clearly against the candles.
• Adjusted positioning of labels to keep them above or below candles instead of
overlapping price.
------------------------
Interface & Usability
------------------------
• Optimized panel layout with a dedicated Setup Proof row for clearer
information flow.
• Improved label readability through brightness-aware text color.
• Adjusted default visual settings for a more balanced, premium appearance.
• Enhanced overall user experience without changing the core readiness logic.
------------------------
Behavior Notes
------------------------
This update does not change the core analytical logic of the script.
The goal is to improve clarity and usability, not to introduce new predictive
behavior.
Users should interpret outputs the same way as before, but with a clearer
active pocket, a contrast-safe label set, and an honest follow-through metric.
------------------------
Limitations Reminder
------------------------
The script remains a rule-based analytical tool.
Market conditions such as volatility, liquidity, and timeframe differences may
affect how states and the proof rate appear.
Outputs should always be interpreted within broader market context.
------------------------
Risk Reminder
------------------------
This script is for educational and analytical purposes only.
It does not provide financial advice or guaranteed trading outcomes.
Users remain responsible for their own decisions.
نص برمجي مفتوح المصدر
بروح TradingView الحقيقية، قام مبتكر هذا النص البرمجي بجعله مفتوح المصدر، بحيث يمكن للمتداولين مراجعة وظائفه والتحقق منها. شكرا للمؤلف! بينما يمكنك استخدامه مجانًا، تذكر أن إعادة نشر الكود يخضع لقواعد الموقع الخاصة بنا.
Public-free scripts + invite-only AGPro workflows for market analysis, liquidity context, risk planning and execution review.
Rules-based. No hype. No guesswork.
Library & access: agprolabs.com/
Telegram: t.me/agprolabs
Rules-based. No hype. No guesswork.
Library & access: agprolabs.com/
Telegram: t.me/agprolabs
إخلاء المسؤولية
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.
نص برمجي مفتوح المصدر
بروح TradingView الحقيقية، قام مبتكر هذا النص البرمجي بجعله مفتوح المصدر، بحيث يمكن للمتداولين مراجعة وظائفه والتحقق منها. شكرا للمؤلف! بينما يمكنك استخدامه مجانًا، تذكر أن إعادة نشر الكود يخضع لقواعد الموقع الخاصة بنا.
Public-free scripts + invite-only AGPro workflows for market analysis, liquidity context, risk planning and execution review.
Rules-based. No hype. No guesswork.
Library & access: agprolabs.com/
Telegram: t.me/agprolabs
Rules-based. No hype. No guesswork.
Library & access: agprolabs.com/
Telegram: t.me/agprolabs
إخلاء المسؤولية
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.