Trade Edge Profiler [AGPro Series]

🧠 Core Idea
Does your setup actually have an edge - or does it just feel like it does?
This script generates rule-based signals and then measures their real, historical outcome on your chart.
📌 Overview / What It Does
Trade Edge Profiler is a performance and signal-statistics dashboard. It generates objective, rule-based pullback-in-trend signals, simulates each one with a defined stop and target in R terms, and then tracks the outcomes on the chart in real time.
The panel reports the measured edge of those signals: win rate, average R, expectancy, profit factor and total sample size. Each signal is marked at its entry price, and each result is marked at its exit price with the R outcome, so you can read every trade like a record.
It does NOT predict price, place orders, or guarantee results. It is a transparent way to study whether a defined setup has produced a positive statistical edge over the available history.
🎯 Purpose & Design Philosophy
Most traders never measure their setups - they rely on a feeling that an entry "works." Trade Edge Profiler replaces that feeling with numbers. By applying one consistent rule set and scoring every signal the same way, it turns a vague impression of edge into a visible, auditable statistic.
It is designed for serious, process-driven traders who care about expectancy and discipline more than signal quantity. This is intentionally a selective tool - quality of signal over volume of signals.
⚡ Why This Script Is Different
Most signal tools show you arrows and stop there - you never learn whether those arrows actually worked.
This script does NOT flood the chart with signals, and it does NOT hide its results.
Instead, it closes the loop: every signal is simulated to a defined stop or target, scored in R, and rolled into a live edge panel. You see entry price, exit price, the R result, and the running win rate, expectancy and profit factor. It is a measurement instrument first and a signal tool second - built to answer "is there an edge here?" honestly.
⚙️ Methodology
1. Trend Context
A multi-EMA model with a slope filter defines the dominant trend and screens out flat, directionless markets.
2. Pullback Trigger
Within that trend, a signal is recognised when price pulls back toward the fast EMA, momentum (RSI) turns back in the trend direction, and price reclaims the fast EMA.
3. Trade Simulation
Each signal is assigned a structural stop (recent swing padded by ATR) and a target at a defined R multiple.
4. Outcome Scoring
Every signal is followed until it hits its target, its stop, or a time limit, then scored in R.
5. Edge Aggregation
Results accumulate into win rate, average R, expectancy and profit factor, shown live in the panel.
🗺️ How to Read the Chart
- Panel: edge status, expectancy, win rate, average R, profit factor, total signals, wins, losses, and current position status.
- Signal labels: mark each entry with its direction and entry price.
- Outcome labels: mark each result with its R value and exit price.
- Trend ribbon: the shaded EMA band, colored by trend direction, gives continuous context.
- Active-trade shading: the background is tinted while a signal is open.
🚦 Signals & States
- Long Signal / Short Signal -> a rule-based pullback entry in the trend direction, marked at entry price.
- Win / Loss (R) -> the scored outcome of a closed signal, marked at exit price.
- Edge: Building / Positive / Negative -> a readout of the measured expectancy over the current sample.
These describe rule-based events and their measured outcomes. They are not directives to enter or exit.
🔔 Alerts Logic
- New Long Signal / New Short Signal -> fires when a fresh signal is generated.
- Signal Hit Target / Signal Hit Stop -> fires when an open signal resolves.
Alerts are attention markers for rule-based events. They are NOT trade instructions.
🧩 Confluence Logic
A signal requires several conditions to align at once - an established trend, a slope that confirms it, a pullback toward the fast EMA, a momentum turn, and a reclaim. This multi-condition gate is why signals are selective rather than frequent.
📊 When To Use
- To evaluate whether a pullback-in-trend approach has an edge on a given market and timeframe.
- On liquid instruments where trend and structure are meaningful.
- As a study and review tool for expectancy and R-based thinking.
- Alongside your own analysis, as a statistical reference rather than a trigger.
⚠️ When NOT To Use
- On illiquid or erratic instruments where outcomes are unreliable.
- As a high-frequency signal source - it is intentionally selective.
- As a standalone reason to enter or exit a position.
- In conditions where you would ignore the measured edge entirely.
🎛️ Key Inputs
- Signal Engine -> EMA lengths, RSI length, pullback level, slope filter and swing lookback that define the setup.
- Trade Model -> ATR length, stop distance, target R multiple, and maximum bars in trade.
- Display -> trend ribbon, active-trade highlight, signal labels, outcome markers, and active levels.
- Panel -> theme, location, font size, and show / hide.
🖥️ Interface & Visual Design
The panel uses a single merged header and a clean, color-coded layout so the edge statistics read at a glance. The trend ribbon keeps the chart informative between signals, signal and outcome labels carry their prices for an at-a-glance trade record, and active trades are gently shaded - all kept clear of the candles for readability.
🧪 Practical Usage Workflow
1. Read the edge status and expectancy in the panel.
2. Review win rate, average R and profit factor across a meaningful sample.
3. Inspect individual signals - entry price, exit price, and R outcome.
4. Compare behaviour across timeframes and markets.
5. Use the measured edge as context within your own plan.
🔍 Interpretation Guidelines
A small sample (the panel shows "Building") is not yet meaningful - let the sample grow. A positive expectancy over a reasonable sample suggests the rule set has historically had an edge on that market; a negative one suggests it has not. Treat all of it as historical measurement, not a forecast.
🚫 What This Script Is NOT
- It is NOT a prediction engine.
- It is NOT financial advice.
- It is NOT an automated trading system.
- It does NOT generate guaranteed signals or outcomes.
⚠️ Limitations & Transparency
Outcomes are simulated on closed bars with a fixed rule set; real execution involves slippage, fees and discretion that are not modelled. Results vary across timeframes, markets and regimes, and past measured behaviour does not predict future results. A trade that times out is scored at its current R, which is an approximation.
🧠 Market Context Notes
Edge tends to be clearer in liquid, trending conditions where the pullback logic has room to work, and weaker in choppy or thin markets. The same rule set can read very differently across instruments and timeframes - that variation is itself useful information.
🧾 Use Case Examples
- A trader checks several timeframes and finds the setup shows positive expectancy on higher timeframes but not lower ones, and adjusts focus accordingly.
- A trader watches the edge panel over a growing sample before trusting a setup, rather than acting on the first few signals.
🧱 System Philosophy
The engine values measurement over marketing and selectivity over volume. Every statistic is derived from the same transparent rule set, so the trader can judge the edge for themselves.
🔐 Non-Promise Statement
This script makes no promises about future price movement and offers no certainty. It is a measurement and visualization tool only.
📉 Risk Disclosure
Trading involves substantial risk. This script is provided for educational and analytical purposes only and does not constitute financial advice. All trading decisions and their outcomes are the sole responsibility of the user. Past behavior of any indicator does not guarantee future results.
📚 Educational Note
Use Trade Edge Profiler to build the habit of measuring before trusting. Studying how expectancy, win rate and profit factor behave across markets can strengthen a disciplined, edge-aware approach to trading.
This update focuses on depth: scoring every signal for quality so each one is graded
at the point it appears, alongside the existing performance statistics.
The core purpose of the script remains unchanged. It still generates objective,
rule-based signals and tracks their historical outcomes on the chart - win rate,
average R, expectancy, profit factor and sample size. This release adds a per-signal
quality score so the read is richer at a glance.
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
------------------------
- Signal quality score (0-100)
Each signal is now scored at the moment it fires, from three components - trend
strength (the fast/slow EMA separation in ATR units), proximity to the fast EMA
(entering near support rather than chasing), and the strength of the momentum turn.
- Quality on the chart and in the panel
The score is shown on every signal label and in the panel for the active signal, so
the grade of a setup is visible without leaving the chart.
- Cleaner trend-strength measure
Trend strength is now measured by EMA separation in ATR units, which behaves
consistently across instruments and timeframes.
------------------------
Visual Improvements
------------------------
- Improved chart readability by adding the quality score to each signal label so the
grade is visible at the point of the signal.
- Reduced visual clutter by keeping the panel compact and grouped into clear blocks.
- Refined visual hierarchy so the overall edge, the sample and the current state each
occupy a distinct block.
- Kept the trend ribbon, active-trade highlight, signal and outcome markers for
continuous at-a-glance context.
------------------------
Interface & Usability
------------------------
- Organized the panel into three blocks: Overall Edge, Sample and Current State, with
the active signal quality shown alongside the status.
- Enhanced overall user experience while keeping panel theme, location and font size
fully adjustable, with the panel shown by default.
- All signal-engine and trade-model settings remain available and unchanged.
------------------------
Behavior Notes
------------------------
This update adds a per-signal quality score. The signal logic, trade model and R math
are unchanged, so the overall statistics match the previous version.
The goal is to improve clarity and depth, not to introduce predictive behavior. The
quality score describes the character of a setup at the moment it fires; it is a
descriptive grade, not a forecast of the outcome. The win rates and R figures
describe how past signals resolved within the visible history.
------------------------
Limitations Reminder
------------------------
The script remains a rule-based analytical tool.
Statistics are computed only over the signals visible in the loaded history, and they
vary with timeframe, instrument and settings. A high quality score does not guarantee
any individual outcome.
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.
This update focuses on sample integrity, completed-bar signal handling, exit-price accuracy, resolution transparency, panel behavior, and visual clarity.
The core purpose of the script remains unchanged.
This release preserves the existing EMA/RSI pullback signal, quality score, structural stop model, R-multiple target, and performance dashboard while correcting verified outcome-accounting errors.
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
------------------------
• Corrected entry-bar outcome contamination.
Signals now register only on confirmed bars, and their stop/target evaluation begins on the following completed bar. Highs and lows printed before the entry close can no longer be counted as post-entry outcomes.
• Corrected stop and target exit prices.
Target resolutions now record the target level and stop resolutions record the stop level. Outcome markers no longer display the exit candle's close as the fill reference for every result.
• Added an explicit resolution reason.
Each outcome is classified as TARGET, STOP, or TIME EXIT. A maximum-holding-window resolution can no longer generate a false target or stop alert merely because its closing R was positive or negative.
• Added a dedicated Signal Timed Out alert.
The existing target and stop alerts now fire only for their matching resolution types.
• Clarified the performance sample.
The panel row formerly named Signals is now Resolved because win rate, expectancy, average R, and profit factor are calculated from completed outcomes only.
• Corrected panel hide behavior.
The table is cleared on the last bar before it is conditionally rebuilt. Disabling Show Panel now removes stale cells.
------------------------
Visual Improvements
------------------------
• Expanded the merged blue header to the full product name: AG Pro Trade Edge Profiler.
• Standardized signal badges to premium uppercase LONG / SHORT presentation.
• Replaced generic Win / Loss outcome text with transparent TARGET / STOP / TIME EXIT reasons.
• Positioned outcome markers according to the trade direction and signed R result:
long gains and short losses appear above price; short gains and long losses appear below price.
• Added contrast-aware text on teal and pink badges.
• Preserved the continuous EMA ribbon, active-signal background shading, signal labels, outcome markers, and projected entry/stop/target references.
------------------------
Interface & Usability
------------------------
• Updated the Show Outcome Markers tooltip to include target, stop, and maximum-holding-window resolutions.
• Clarified the Stop Distance tooltip: the input sets a minimum ATR distance while allowing the recent structural swing to widen the stop.
• Preserved Show Panel, panel theme, panel location, panel font size, label font size, signal/outcome visibility, active-level visibility, trend ribbon, active background, label offset, and forward projection controls.
• Preserved all Signal Engine and Trade Model defaults.
------------------------
Behavior Notes
------------------------
The signal formula remains unchanged: EMA trend alignment, slow-EMA slope, fast-EMA pullback, RSI turn, and price reclaim.
Signal quality remains a 0-100 descriptive score derived from EMA separation in ATR units, entry proximity to the fast EMA, and RSI-turn strength.
Only one signal is tracked at a time. A new signal can register only when the profiler is flat and the trigger bar is confirmed.
If both stop and target are touched in the same post-entry candle, stop is evaluated first because bar data cannot reveal the intrabar path. This is intentionally conservative.
Time exits continue to be scored at the closing R of the maximum holding bar. Positive time exits count as wins and negative or zero time exits count as losses; their reason remains TIME EXIT rather than target or stop.
Because the entry-bar contamination was corrected, historical statistics may differ materially from V2.0. The new figures represent the intended close-entry model.
------------------------
Limitations Reminder
------------------------
The script remains a rule-based analytical profiler rather than a broker-execution simulator.
It does not model commission, fees, spread, slippage, order queues, or gap fills. Target and stop outcomes use their model levels, while time exits use the completed candle close.
When target and stop are both inside one candle, the exact intrabar sequence is unknown and the conservative stop-first rule is applied.
Statistics depend on loaded history, symbol, timeframe, and settings. Past measured behavior does not predict future performance.
------------------------
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.
• Refreshed the publication and access routing information.
• Core trade-edge profiling logic, panel behavior, inputs, alerts, visuals, and outputs remain unchanged.
This update focuses on chart-label separation and first-glance readability.
The statistical model, signal logic, panel metrics, and core purpose of the script remain unchanged.
------------------------
What Changed
------------------------
• Separated signal labels and outcome labels into independent vertical lane systems.
• Increased ATR-based spacing between recent model labels to prevent stacked or partially hidden badges.
• Kept outcome markers closer to their event price while positioning model badges farther from the candles.
------------------------
Visual Improvements
------------------------
• Reduced overlap between DOWNSIDE / UPSIDE MODEL labels and MODEL TARGET / RISK EDGE / TIME REVIEW markers.
• Preserved the existing event history, premium color hierarchy, and adjustable label-size controls.
• Improved readability without removing analytical context from the chart.
------------------------
Behavior Notes
------------------------
This update does not change the core analytical or statistical logic of the script.
It is a focused presentation refinement for clearer event review.
------------------------
Limitations Reminder
------------------------
The script remains a rule-based analytical tool. Market conditions, volatility, and timeframe selection may affect how events appear.
------------------------
Risk Reminder
------------------------
This script is for educational and analytical purposes only. It does not provide financial advice or guaranteed trading outcomes.
This update gives the measured edge a continuous on-chart identity while preserving the EMA/RSI pullback engine, signal-quality model, structural R framework, conservative statistics, outcome accounting and all five completed-bar alerts.
• Added an always-available Edge Evidence Beacon owned by the live EMA ribbon context, so expectancy, conservative expectancy, profit factor, win rate, confidence floor and resolved sample remain visible even when no model is active.
• Made the beacon adaptive: an open model now adds its direction, locked quality score and live R, while a flat state shows the current evidence review without implying an active trade.
• Added font-aware ATR clearance and lifecycle-safe vertical and horizontal guides to keep the evidence card away from current candles while preserving its ribbon ownership.
• Renamed signal badges as explicit MODEL START events and resolution badges as OUTCOME events, separating event history from the live model state shown in the beacon and panel.
• Increased signal-label clearance to a seven-candle cluster while retaining the tighter outcome-marker placement needed for exact event review.
• Converted the panel Edge State row into a full-width contrast-safe state band and gave the flat Active Model value a durable indigo treatment for reliable light- and dark-chart readability.
• Disabled active-model background tint by default to remove broad vertical shading from publication screenshots while preserving it as an optional display control.
• Preserved confirmed-bar entries, next-bar outcome evaluation, conservative stop-first handling, exact target/stop exit references, time-review scoring, accumulated R statistics and all existing alert expressions.
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/