Edge Confidence Gauge [AGPro Series]

🧠 Core Idea
Is your edge real yet — or could this win rate just be luck from too few trades?
A win rate alone says nothing about whether it will hold. This tool asks the harder question: given how many trades you actually have, is your edge statistically distinguishable from breakeven, or not yet?
📌 Overview / What it does
Edge Confidence Gauge wraps a Wilson score confidence interval around your win rate and your sample size, then tests whether the interval's lower bound clears the breakeven win rate implied by your reward-to-risk. Instead of trusting a raw percentage, you see a range — and whether that whole range sits on the winning side of breakeven.
Win rate and sample count come from a built-in trigger and proof engine, or are entered manually. The tool reports the confidence interval, the breakeven win rate, a 0–100 confidence score, a clear verdict, and an estimate of how many more samples would be needed to confirm a marginal edge. The signature horizontal bracket shows the interval against the breakeven line at a glance.
It does NOT predict price, generate entries, or guarantee outcomes. It measures the reliability of the evidence behind an edge.
🎯 Purpose & Design Philosophy
A 60% win rate over 10 trades and a 60% win rate over 1,000 trades are not the same claim — but most tools display them identically. Traders routinely act on small samples, mistaking noise for an edge, and abandon real edges during normal variance because they never knew how much evidence they actually had.
Edge Confidence Gauge was built to make sample size visible and statistical significance concrete. Where an edge-size tool tells you how big your edge is, this tool tells you whether you can trust it yet. It supports a patient, evidence-aware mindset and discourages over-sizing on unproven results.
⚡ Why This Script Is Different
Most win-rate and edge tools show a single percentage and stop there, treating five trades and five hundred as equally trustworthy.
This script does NOT present the win rate as a settled fact, and it does NOT pretend statistical significance means guaranteed profit.
Instead, it surrounds the win rate with a confidence interval sized by your sample count, draws the breakeven line through that interval, and delivers an explicit verdict — established, promising, or not significant — plus how much more data a marginal edge would need. You see the uncertainty, not just the point estimate.
⚙️ Methodology
1. Measured Samples
Win rate (p̂) and sample count (N) are obtained from a transparent proxy: an entry when price crosses a configurable EMA, a stop at one ATR, and a target at R ATR. Whichever level is reached first resolves the trade as a win or a loss. Manual mode lets you enter win rate and N directly.
2. Wilson Interval
A Wilson score confidence interval is computed at the chosen confidence level (90%, 95%, or 99%), giving a lower and upper bound around the win rate that behaves well even for small samples.
3. Breakeven Test
The breakeven win rate W* = 1 / (1 + R) is computed from your reward-to-risk. The edge is statistically established when the interval's lower bound clears W*.
4. Verdict & Sufficiency
The tool classifies the edge as established, promising, or not significant, scores how firmly the lower bound clears breakeven on a 0–100 scale, and estimates the additional samples a promising-but-unproven edge would need to confirm.
🗺️ How to Read the Chart
• CI bracket — A horizontal strip showing win rate against breakeven. The colored band is the confidence interval, tinted by verdict; the ◆ marks the win rate; the red │ column marks the breakeven win rate.
• Band vs breakeven — When the band's left edge sits to the right of the red breakeven column, the edge is statistically established.
• On-chart badge — A floating badge at the last bar shows the confidence score and verdict, tier-colored.
• Win/loss markers — In Measured mode, small markers flag the resolution of each proxy trade.
• Decision panel — The premium panel lists win rate, sample count, interval bounds, breakeven, confidence score, verdict, and the recommended next action.
🚦 Signals & States
• Established edge → the interval's lower bound clears breakeven; the edge is statistically supported.
• Promising → the win rate is above breakeven but the interval still straddles it; positive but unproven.
• Not significant → the win rate is at or below breakeven; not distinguishable from luck at this sample.
States describe the strength of the evidence, not a prediction about the next trade.
🔔 Alerts Logic
• Edge became significant — fires when the lower bound crosses above breakeven.
• Edge lost significance — fires when the lower bound falls back below breakeven.
Alerts are attention markers about the statistical state of the edge. They are NOT trade instructions.
🧩 Confluence Logic
Confidence is strongest when several conditions align: a healthy sample count, an interval comfortably clear of breakeven, and a confidence score well above the midpoint. A high win rate on a thin sample is not confluence — it is a hypothesis awaiting data.
📊 When to Use
• Validating whether a strategy's measured win rate is statistically meaningful.
• Deciding when a developing edge has enough evidence to size up.
• Comparing the reliability of the same trigger across instruments and timeframes.
• Teaching or studying sample size, significance, and breakeven win rate.
⚠️ When NOT to Use
• On very small samples, where any win rate is statistically inconclusive by design.
• In thin, illiquid markets where the ATR-based proxy stop and target resolve erratically.
• During extreme volatility, where realized risk diverges sharply from the ATR unit.
• As a market-timing or entry tool — it measures evidence quality, not the next move.
🎛️ Key Inputs
• Win-rate source — Measured (trigger + proof engine) or Manual (win rate and N).
• Payoff R — The reward-to-risk that sets the breakeven win rate.
• Confidence level — 90%, 95%, or 99% for the interval.
• Trigger EMA / ATR length / Max bars in trade — Shape and resolve the proxy trades.
• Min samples before scoring — Holds the verdict until enough trades exist.
• Confidence score scale & dead-band — Calibrate the 0–100 score and the significance threshold.
• Bracket & panel — Show/hide, position, theme (Dark/Light), and independent font sizes.
🖥️ Interface & Visual Design
The interface keeps the statistics readable: a compact decision panel for the numbers and verdict, a horizontal confidence-interval bracket for the at-a-glance significance read, and a single floating badge on price. A merged header, a fixed professional palette, and luminance-aware text keep everything legible on dark and light charts. Scores are shown numerically, never as bars.
🧪 Practical Usage Workflow
1. Read the panel — note win rate, sample count, interval, and confidence score.
2. Read the bracket — see whether the band's lower edge clears the red breakeven column.
3. Check the verdict — established, promising, or not significant.
4. If promising — note the estimated samples still needed before relying on it.
5. Decide — size and trust the edge in proportion to the evidence, not the headline number.
🔍 Interpretation Guidelines
Treat the win rate as a claim and the interval as the strength of evidence for it. A wide interval means too little data; a narrow interval clear of breakeven means a well-supported edge. Significance is a threshold, not a promise — an established edge can still underperform, and a not-yet-significant edge is not necessarily absent, only unproven.
🚫 What This Script Is NOT
• It is NOT a prediction engine — it does not forecast price or the next trade.
• It is NOT financial advice.
• It is NOT an automated or signal-trading system.
• It does NOT guarantee that a statistically established edge will remain profitable.
⚠️ Limitations & Transparency
The measured win rate depends entirely on the built-in proxy trigger, which is a stand-in for your own entries and will differ from them. The confidence interval assumes independent trades drawn from a stable process; real edges drift and real trades cluster. Statistical significance describes the past sample, not the future. Past win rate is not future win rate.
🧠 Market Context Notes
Win rate is a property of a process across many trades under specific conditions. Regime shifts, volatility, and liquidity all change how the proxy trades resolve, which in turn moves the interval. Read significance as a snapshot of the current sample, refreshed as conditions and trade count evolve.
🧾 Use Case Examples
• A 46% win rate over 80 trades at 2.0R produces an interval whose lower bound clears the 33.3% breakeven — the edge reads as established.
• A 35% win rate over a large sample at 2.0R sits just above breakeven, but the interval still straddles it — the edge reads as promising, with the panel estimating how many more trades would confirm it.
🧱 System Philosophy
AGPro tools are built to support decisions, not replace them. Edge Confidence Gauge follows that principle: it exposes the uncertainty behind a win rate transparently, states plainly whether the evidence clears breakeven, and leaves the sizing decision — and the responsibility — with you.
🔐 Non-Promise Statement
This script makes no promises and offers no certainty. It is a statistical and visualization tool. An established edge describes a sample at a confidence level, not a guarantee of future profit.
📉 Risk Disclosure
Trading involves substantial risk of loss and is not suitable for everyone. This script is provided for educational and analytical purposes only and does not constitute financial advice or a recommendation to buy or sell any instrument. All trading decisions, and their consequences, remain entirely your own responsibility.
📚 Educational Note
Use Edge Confidence Gauge to build intuition for how sample size governs trust. The lasting takeaway is not any single verdict, but the habit of asking how much evidence stands behind a win rate before acting on it.
This focused update improves statistical-state integrity, proof-sample transparency, and interface reliability while preserving the original Edge Confidence Gauge concept and signature Wilson interval visual.
The script remains a statistical analysis and visualization tool. It does not predict price direction, automate trading, or guarantee future performance.
------------------------
What Changed
------------------------
• Confirmed significance alerts
Significance alerts now evaluate only on confirmed bars. Loading the script or reaching the minimum sample threshold initializes the state without generating a synthetic “became significant” event.
• Proof-sample audit
The panel now reports resolved wins, resolved losses, and expired observations as W / L / X. Expired observations remain excluded from Wilson scoring, but are no longer invisible.
• Threshold-aligned confidence score
The 0–100 score midpoint now uses the same breakeven-plus-dead-band significance floor as the established-edge verdict.
• Safer sample guidance
The approximate additional-sample calculation now uses the actual significance floor and cannot report zero additional samples while the edge remains promising but unconfirmed.
• Axis-order protection
The confidence bracket normalizes inverted axis minimum and maximum inputs before mapping the interval, point estimate, and breakeven marker.
------------------------
Visual Improvements
------------------------
• Preserved the signature horizontal Wilson confidence bracket, verdict colors, win/loss markers, and floating confidence badge
• Added a compact Proof Audit row without changing the chart’s visual identity
• Rebuilt both blue title rows after every table clear, merged them across the full width, and then wrote only the script name
• Preserved luminance-aware text and the established AGPro palette
------------------------
Interface & Usability
------------------------
• The badge and confidence bracket now clear deterministically when hidden
• The Max bars tooltip now explains how expired observations affect scoring and the audit
• Inverted bracket ranges remain readable without requiring the user to reorder inputs manually
------------------------
Behavior Notes
------------------------
The Wilson interval formula, EMA-cross trigger, ATR risk unit, first-touch stop/target engine, breakeven equation, confidence levels, and three-state verdict structure remain unchanged.
The update changes alert timing, score alignment, sample guidance, and audit visibility. Expired observations are not retroactively counted as wins or losses.
------------------------
Limitations Reminder
------------------------
The measured sample belongs to the built-in EMA-cross proxy, not necessarily to a user’s strategy. Expired observations are excluded, and OHLC bars cannot reveal intrabar order when stop and target are both touched; the engine retains its conservative stop-first convention.
The extra-sample estimate holds the observed win rate fixed and remains an approximation. Real edges drift, observations can cluster, and results vary with symbol, timeframe, volatility, liquidity, gaps, costs, and market regime.
------------------------
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 assumptions, risk limits, and decisions.
• Refreshed the publication and access routing information.
• Core edge-confidence logic, panel behavior, inputs, alerts, visuals, and outputs remain unchanged.
This update focuses on evidence clarity, chart readability, and presentation quality.
The core analytical logic remains unchanged.
------------------------
What Changed
------------------------
• Redesigned the decision panel around one clear question:
“Does this edge reliably clear breakeven?”
• Added clearer terminology for Measured Win Rate, Reliable Floor, Required Win Rate, Reliability Range, and Evidence Score.
• Added a Resolved Samples and Proof Audit section for transparent win, loss, and expired-observation tracking.
• Added Recent Proof Outcomes with sample IDs and resolved R results.
• Anchored outcome labels to their actual resolution bars so they remain semantically consistent while zooming or scrolling.
------------------------
Visual Improvements
------------------------
• Improved spacing between recent outcome labels to reduce overlap.
• Refined the main verdict badge and confidence gauge for faster first-glance interpretation.
• Strengthened the visual hierarchy between measured evidence, required breakeven rate, and the final verdict.
• Improved compact-chart resilience without covering price candles.
------------------------
Interface & Usability
------------------------
• Simplified technical language throughout the interface.
• Made the current verdict and next action easier to understand.
• Preserved adjustable panel position, theme, and font-size controls.
------------------------
Behavior Notes
------------------------
This update does not change the core proof engine, confidence calculations, alerts, or analytical methodology.
It improves how the existing evidence is presented and interpreted.
------------------------
Risk Reminder
------------------------
This script is a rule-based analytical and visualization tool.
It does not predict price direction, provide financial advice, or guarantee trading outcomes.
This update focuses on evidence clarity, chart readability, and presentation quality.
The core analytical logic remains unchanged.
This update focuses on evidence integrity, audit transparency, panel efficiency, and chart readability.
The core purpose of the script remains unchanged.
This release preserves the Wilson confidence framework while making uncertain same-bar outcomes explicit and easier to audit.
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
------------------------
• Added an explicit same-bar target-and-stop policy
When both the target and stop are touched inside the same OHLC bar, the order of events cannot be known from bar data alone.
The new default “Exclude” policy records that observation as ambiguous without adding it to wins, losses, or the Wilson sample.
• Added deterministic policy alternatives
Users may select “Stop First” or “Target First” when a fixed conservative or optimistic assumption is required for their testing workflow.
• Expanded the proof audit
The panel now reports W / L / A / X:
wins, losses, ambiguous same-bar observations, and expired observations.
• Added ambiguous outcome markers
Excluded same-bar observations are shown as neutral audit events so the chart and panel remain fully traceable.
• Preserved the statistical engine
The breakeven threshold, Wilson interval, reliability floor, evidence score, and significance test remain unchanged.
------------------------
Visual Improvements
------------------------
• Removed the floating “Recent Proof Outcomes” header that could overlap active candles
• Preserved four recent audit labels in separated lanes below the recent price range
• Reduced vertical spread between audit lanes while keeping labels away from candles
• Added theme-safe contrast for the full-width analytical question row
------------------------
Interface & Usability
------------------------
• Reduced the decision panel from thirteen rows to twelve
• Consolidated the action conclusion into one full-width footer row
• Replaced the long proof-audit sentence with a compact W / L / A / X structure
• Kept panel position, panel visibility, theme, panel font size, bracket position, bracket font size, and evidence label size configurable
------------------------
Behavior Notes
------------------------
The Wilson confidence logic and breakeven comparison are unchanged.
The default same-bar behavior is now more conservative and transparent:
ambiguous observations are audited but excluded from the scored sample.
Because prior versions silently treated simultaneous target-and-stop bars as losses, historical measured counts may change under the new default policy.
------------------------
Limitations Reminder
------------------------
The built-in measured engine uses OHLC bar data and a transparent EMA-cross proxy trigger.
OHLC data cannot reveal the intrabar order of target and stop touches.
The selected same-bar policy should therefore be interpreted as a modeling rule, not reconstructed tick-level truth.
Market conditions such as volatility, liquidity, and timeframe differences may affect how observations resolve.
------------------------
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.
This update improves the active confidence story, evidence-label spacing, and historical rendering discipline while preserving the Wilson reliability model and significance logic.
• Replaced repeated deletion and recreation of the active gauge badge with in-place label synchronization on every last-bar update.
• Moved the active confidence badge into controlled future space and added an owned dotted connector back to the latest price context.
• Increased the default badge distance from 0.50 ATR to 1.50 ATR to keep the confidence readout clear of nearby candles.
• Added font-aware transition lanes so evidence-state labels retain stronger separation across Tiny, Small, Normal, and Large settings.
• Made the four-outcome proof ladder spacing font-aware and ATR-aware while preserving each outcome’s actual resolution time.
• Added a configurable outcome-marker history window, set to 1,200 bars by default, for bounded win, loss, and ambiguous marker rendering.
• Added alternating decision-panel row surfaces and reduced reserved object capacity to match the persistent visual footprint.
• Preserved the measured/manual proof engine, ambiguity and timeout audit, Wilson interval, breakeven significance test, confidence score, sample guidance, bracket model, and both confirmed alerts.
The script remains a rule-based statistical reliability and risk-management visualization tool. Results depend on the trigger model, payoff assumptions, sample depth, confidence setting, timeframe, and market conditions. It does not provide financial advice, automated trading, predictions, or guaranteed outcomes.
Invite-only script
Only users approved by the author can access this script. You'll need to request and get permission to use it. This is typically granted after payment. For more details, follow the author's instructions below or contact AGProLabs directly.
TradingView does NOT recommend paying for or using a script unless you fully trust its author and understand how it works. You may also find free, open-source alternatives in our community scripts.
Author's instructions
tradingview.com/script/XJmX3p98-Trading-Suite-AGPro-Series/
🔷 Crypto Setup Planner - Multi-Symbol Planner
tradingview.com/script/LgVRo7Ql-Crypto-Setup-Planner-AGPro-Series/
Disclaimer
Invite-only script
Only users approved by the author can access this script. You'll need to request and get permission to use it. This is typically granted after payment. For more details, follow the author's instructions below or contact AGProLabs directly.
TradingView does NOT recommend paying for or using a script unless you fully trust its author and understand how it works. You may also find free, open-source alternatives in our community scripts.
Author's instructions
tradingview.com/script/XJmX3p98-Trading-Suite-AGPro-Series/
🔷 Crypto Setup Planner - Multi-Symbol Planner
tradingview.com/script/LgVRo7Ql-Crypto-Setup-Planner-AGPro-Series/