Use your browser’s Find (Ctrl+F / ⌘F) to locate a setting. Open its row for the full explanation and limits. Source-check time is a verification timestamp, not a script publication date.
![Risk of Ruin Engine [AGPro Series] actual TradingView interface on SOLUSDT (1D)](../images/product-settings/51-1.jpg)
Edge Source
5 inputsEdge source
- Input type
string- Source default
"Measured"- Available options
["Measured", "Manual"]- Minimum
Not specified in source- Maximum
Not specified in source- Step
Not specified in source
What it controls
Measured = win rate is sampled from a built-in symmetric trigger on this symbol.
Effect on the script
Manual = you enter the win rate and payoff directly.
When to adjust it
Use the source that matches the question being studied and keep its origin clear when comparing outputs.
Interpretation and limits
A built-in proxy is not a personal account record. Manual assumptions are not automatically verified by the script.
Original input tooltip
Measured = win rate is sampled from a built-in symmetric trigger on this symbol. Manual = you enter the win rate and payoff directly.
Manual win rate (%)
- Input type
float- Source default
55.0- Available options
Not specified in source- Minimum
1.0- Maximum
99.0- Step
0.5
What it controls
Used in Manual mode.
Effect on the script
The percentage of trades that win.
When to adjust it
Update it when the independently documented scenario or evidence supporting the manual assumption changes.
Interpretation and limits
An entered percentage is not measured evidence and does not establish the chance of the next trade winning.
Original input tooltip
Used in Manual mode. The percentage of trades that win.
Manual payoff (R)
- Input type
float- Source default
1.0- Available options
Not specified in source- Minimum
0.1- Maximum
20.0- Step
0.1
What it controls
Used in Manual mode.
Effect on the script
Average win divided by average loss, in R multiples.
When to adjust it
Adjust it when comparing an explicitly stated payoff scenario, alongside win rate and modeled costs.
Interpretation and limits
A requested payoff is not an achieved average return or a guarantee of execution.
Original input tooltip
Used in Manual mode. Average win divided by average loss, in R multiples.
Manual sample size
- Input type
int- Source default
100- Available options
Not specified in source- Minimum
2- Maximum
100000- Step
Not specified in source
What it controls
Used in Manual mode to estimate the two-sided 95% Wilson lower endpoint.
Effect on the script
Larger samples produce a tighter confidence range.
When to adjust it
Change it only when the specific analytical or presentation question in the tooltip changes.
Interpretation and limits
Record the configuration when comparing observations; a changed setting is not proof of a stronger future result.
Original input tooltip
Used in Manual mode to estimate the two-sided 95% Wilson lower endpoint. Larger samples produce a tighter confidence range.
Use Wilson lower bound
- Input type
bool- Source default
true- Available options
Not specified in source- Minimum
Not specified in source- Maximum
Not specified in source- Step
Not specified in source
What it controls
Uses the lower endpoint of the two-sided 95% Wilson interval (z=1.96) instead of the observed win rate for conservative expectancy, Kelly, and ruin modeling.
Effect on the script
Selects the confidence requirement used by the documented sample-based interval or lower-bound calculation.
When to adjust it
Compare confidence assumptions while keeping the observed sample and payoff definition unchanged.
Interpretation and limits
A confidence setting is not the probability of the next outcome or proof that the sampled process will persist.
Original input tooltip
Uses the lower endpoint of the two-sided 95% Wilson interval (z=1.96) instead of the observed win rate for conservative expectancy, Kelly, and ruin modeling.
Measured Trigger
7 inputsBreakout lookback
- Input type
int- Source default
20- Available options
Not specified in source- Minimum
2- Maximum
200- Step
Not specified in source
What it controls
An N-bar breakout defines each neutral, direction-aware trigger that is then tracked to a win or a loss.
Effect on the script
Changes the measurement horizon used by the oscillator, trend, range, or context component named by the setting.
When to adjust it
Change it when comparing a different analytical horizon and record the configuration alongside the observations.
Interpretation and limits
Different windows produce different contexts and are not evidence of an improved future result.
Original input tooltip
An N-bar breakout defines each neutral, direction-aware trigger that is then tracked to a win or a loss.
Target (ATR ×)
- Input type
float- Source default
1.0- Available options
Not specified in source- Minimum
0.1- Maximum
20.0- Step
0.1
What it controls
Profit target distance for each measured trade, in ATR.
Effect on the script
Payoff R = target ÷ stop.
When to adjust it
Change it only when the specific analytical or presentation question in the tooltip changes.
Interpretation and limits
Record the configuration when comparing observations; a changed setting is not proof of a stronger future result.
Original input tooltip
Profit target distance for each measured trade, in ATR. Payoff R = target ÷ stop.
Stop (ATR ×)
- Input type
float- Source default
1.0- Available options
Not specified in source- Minimum
0.1- Maximum
20.0- Step
0.1
What it controls
Stop distance for each measured trade, in ATR.
Effect on the script
Payoff R = target ÷ stop.
When to adjust it
Change it only when the specific analytical or presentation question in the tooltip changes.
Interpretation and limits
Record the configuration when comparing observations; a changed setting is not proof of a stronger future result.
Original input tooltip
Stop distance for each measured trade, in ATR. Payoff R = target ÷ stop.
Forward window (bars)
- Input type
int- Source default
40- Available options
Not specified in source- Minimum
3- Maximum
300- Step
Not specified in source
What it controls
How many bars a measured trade is tracked before it expires.
Effect on the script
Expired observations are reported separately and excluded from win-rate math.
When to adjust it
Change it when studying another explicitly defined event or observation horizon.
Interpretation and limits
Expired observations are reported separately and excluded from win-rate math.
Original input tooltip
How many bars a measured trade is tracked before it expires. Expired observations are reported separately and excluded from win-rate math.
Same-bar target & stop
- Input type
string- Source default
"Exclude"- Available options
["Exclude", "Stop First", "Target First"]- Minimum
Not specified in source- Maximum
Not specified in source- Step
Not specified in source
What it controls
OHLC bars cannot reveal whether target or stop occurred first when both are touched.
Effect on the script
Exclude avoids inventing an order; the other modes apply an explicit sensitivity assumption.
When to adjust it
Use it for a stated ambiguity-policy comparison while keeping all other observation settings fixed.
Interpretation and limits
Exclude avoids inventing an order; the other modes apply an explicit sensitivity assumption.
Original input tooltip
OHLC bars cannot reveal whether target or stop occurred first when both are touched. Exclude avoids inventing an order; the other modes apply an explicit sensitivity assumption.
Minimum samples
- Input type
int- Source default
20- Available options
Not specified in source- Minimum
5- Maximum
200- Step
Not specified in source
What it controls
Resolved win/loss samples needed before the edge is shown.
Effect on the script
Ambiguous and expired observations are not counted as wins or losses.
When to adjust it
Use it to specify the minimum amount of eligible evidence required for the review.
Interpretation and limits
Ambiguous and expired observations are not counted as wins or losses.
Original input tooltip
Resolved win/loss samples needed before the edge is shown. Ambiguous and expired observations are not counted as wins or losses.
ATR length
- Input type
int- Source default
14- Available options
Not specified in source- Minimum
1- Maximum
100- Step
Not specified in source
What it controls
Controls atr length within the Measured Trigger settings group.
Effect on the script
Changes the ATR measurement window used by the documented volatility and distance calculations.
When to adjust it
Adjust it only when deliberately comparing a different volatility baseline.
Interpretation and limits
A different ATR unit changes the reference context; it does not make adverse price movement safely bounded.
Risk Model
4 inputsKelly fraction
- Input type
float- Source default
0.5- Available options
Not specified in source- Minimum
0.1- Maximum
1.0- Step
0.05
What it controls
Fraction of full Kelly shown as sizing context.
Effect on the script
Multiplies the full Kelly percentage to produce the displayed fractional-Kelly context.
When to adjust it
Change it only when the specific analytical or presentation question in the tooltip changes.
Interpretation and limits
Kelly assumes stable, independent outcomes and is not a risk instruction.
Original input tooltip
Fraction of full Kelly shown as sizing context. Kelly assumes stable, independent outcomes and is not a risk instruction.
Loss barrier (%)
- Input type
float- Source default
50.0- Available options
Not specified in source- Minimum
5.0- Maximum
99.0- Step
1.0
What it controls
Loss barrier relative to starting capital, not rolling peak-to-trough drawdown.
Effect on the script
Enters the loss-barrier proxy and modeled risk-ceiling calculations as a percentage relative to starting capital.
When to adjust it
Change it only when the specific analytical or presentation question in the tooltip changes.
Interpretation and limits
It is not an exact account-ruin probability.
Original input tooltip
Loss barrier relative to starting capital, not rolling peak-to-trough drawdown. This infinite-horizon diffusion-style proxy assumes independent fixed-payoff outcomes. It is not an exact account-ruin probability.
Model reference risk (%)
- Input type
float- Source default
2.0- Available options
Not specified in source- Minimum
0.1- Maximum
20.0- Step
0.1
What it controls
Per-trade fractional risk used for the model-survival comparison.
Effect on the script
Sets the fractional-risk assumption used for the displayed reference barrier proxy.
When to adjust it
Change it only when the specific analytical or presentation question in the tooltip changes.
Interpretation and limits
Record the configuration when comparing observations; a changed setting is not proof of a stronger future result.
Original input tooltip
Per-trade fractional risk used for the model-survival comparison.
Maximum tolerated modeled ruin (%)
- Input type
float- Source default
1.0- Available options
Not specified in source- Minimum
0.1- Maximum
50.0- Step
0.1
What it controls
Sets the maximum modeled ruin probability used to derive the risk ceiling.
Effect on the script
Defines the modeled-proxy limit used when deriving the displayed risk ceiling.
When to adjust it
Change it only when the specific analytical or presentation question in the tooltip changes.
Interpretation and limits
This is analytical context, not a position-size instruction.
Original input tooltip
Sets the maximum modeled ruin probability used to derive the risk ceiling. This is analytical context, not a position-size instruction.
Visuals
5 inputsShow observation map
- Input type
bool- Source default
true- Available options
Not specified in source- Minimum
Not specified in source- Maximum
Not specified in source- Step
Not specified in source
What it controls
Displays the actual fixed target and stop ranges of measured observations.
Effect on the script
Teal = target range; rose = stop range; indigo = entry reference. These are research observations, not executed trades. Hidden in Manual mode.
When to adjust it
Toggle it to inspect that element or make space for the current chart review.
Interpretation and limits
A visibility switch does not turn a visual reference into an executed order or validated result.
Original input tooltip
Displays the actual fixed target and stop ranges of measured observations. Teal = target range; rose = stop range; indigo = entry reference. These are research observations, not executed trades. Hidden in Manual mode.
Observation map history
- Input type
int- Source default
8- Available options
Not specified in source- Minimum
1- Maximum
16- Step
Not specified in source
What it controls
Maximum number of recent observation pairs retained.
Effect on the script
Closed boxes end at the resolution bar; no future outcome is implied.
When to adjust it
Change it only when the specific analytical or presentation question in the tooltip changes.
Interpretation and limits
Record the configuration when comparing observations; a changed setting is not proof of a stronger future result.
Original input tooltip
Maximum number of recent observation pairs retained. Closed boxes end at the resolution bar; no future outcome is implied.
Show measured trade outcomes
- Input type
bool- Source default
true- Available options
Not specified in source- Minimum
Not specified in source- Maximum
Not specified in source- Step
Not specified in source
What it controls
Controls whether the chart displays measured trade outcomes.
Effect on the script
Controls visibility of the chart element named by this setting.
When to adjust it
Toggle it to inspect that element or make space for the current chart review.
Interpretation and limits
A visibility switch does not turn a visual reference into an executed order or validated result.
Show on-chart summary
- Input type
bool- Source default
true- Available options
Not specified in source- Minimum
Not specified in source- Maximum
Not specified in source- Step
Not specified in source
What it controls
Shows or hides the four on-chart model summary badges.
Effect on the script
This visual option does not change calculations.
When to adjust it
Toggle it to inspect that element or make space for the current chart review.
Interpretation and limits
A visibility switch does not turn a visual reference into an executed order or validated result.
Original input tooltip
Shows or hides the four on-chart model summary badges. This visual option does not change calculations.
Label size
- Input type
string- Source default
"Normal"- Available options
["Tiny", "Small", "Normal", "Large"]- Minimum
Not specified in source- Maximum
Not specified in source- Step
Not specified in source
What it controls
Controls the text size for label size.
Effect on the script
Controls the text-size mapping used by the relevant panel or chart-label renderer.
When to adjust it
Adjust it for the chart size and viewing distance while preserving readable boundaries and state information.
Interpretation and limits
A larger font can increase chart overlap. Text size does not change the analytical observations.
Decision Panel
5 inputsPanel page
- Input type
string- Source default
"Overview"- Available options
["Overview", "Evidence"]- Minimum
Not specified in source- Maximum
Not specified in source- Step
Not specified in source
What it controls
Overview shows model context and the risk ladder.
Effect on the script
Evidence shows input quality, exclusions and assumptions.
When to adjust it
Use the current-state view for orientation and the available evidence/audit view when checking observation provenance and exclusions.
Interpretation and limits
Evidence shows input quality, exclusions and assumptions.
Original input tooltip
Overview shows model context and the risk ladder. Evidence shows input quality, exclusions and assumptions.
Show panel
- Input type
bool- Source default
true- Available options
Not specified in source- Minimum
Not specified in source- Maximum
Not specified in source- Step
Not specified in source
What it controls
Shows or hides the workflow panel.
Effect on the script
Controls whether the workflow table is rendered on the chart.
When to adjust it
Show the panel to inspect the state and evidence, or hide it when chart space is the immediate priority.
Interpretation and limits
Hiding the panel is a presentation choice; do not treat missing rows as missing risk.
Panel position
- Input type
string- Source default
"Top Right"- Available options
["Top Right", "Top Left", "Bottom Right", "Bottom Left", "Middle Right"]- Minimum
Not specified in source- Maximum
Not specified in source- Step
Not specified in source
What it controls
Selects where the workflow panel is placed on the chart.
Effect on the script
Selects the table position used by the panel renderer.
When to adjust it
Move the panel when it overlaps active candles, the current workflow zone, or reference labels.
Interpretation and limits
Panel placement changes presentation, not the detected context or observation accounting.
Theme
- Input type
string- Source default
"Dark"- Available options
["Dark", "Light"]- Minimum
Not specified in source- Maximum
Not specified in source- Step
Not specified in source
What it controls
Selects the available panel contrast theme.
Effect on the script
Selects the panel background, border, and text color scheme used for contrast.
When to adjust it
Choose the available theme that keeps the panel readable against the chart background.
Interpretation and limits
A theme changes appearance; it does not change event qualification or statistical evidence.
Panel font size
- Input type
string- Source default
"Normal"- Available options
["Tiny", "Small", "Normal", "Large"]- Minimum
Not specified in source- Maximum
Not specified in source- Step
Not specified in source
What it controls
Controls the text size for panel font size.
Effect on the script
Controls the text-size mapping used by the relevant panel or chart-label renderer.
When to adjust it
Adjust it for the chart size and viewing distance while preserving readable boundaries and state information.
Interpretation and limits
A larger font can increase chart overlap. Text size does not change the analytical observations.
Keep the settings in context
Change one analytical assumption at a time and compare the same instrument, timeframe and history. A chart reference, score, observation rate or input default does not establish a trade fill, a forward probability or a guaranteed outcome.
Return to the product overview · View this script on TradingView