OPEN-SOURCE SCRIPT
已更新

Setup Quality Scorecard [AGPro Series]

6 286
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.
版本注释
UPDATE NOTES - v2.0

This 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.

免责声明

这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。