OPEN-SOURCE SCRIPT
Expectancy Reality Check

Most trading discussions focus on entries.
This tool focuses on math.
Expectancy Reality Check is a symbol-agnostic calculator that shows whether your assumed edge is mathematically viable — before you trade it.
It does not generate signals.
It does not predict price.
It exists to answer one question:
“If my assumptions are correct, does this strategy deserve capital?”
What this tool does
Given your assumptions for:
Win rate
Reward-to-Risk (R)
Costs per trade
Risk per trade
Trade frequency
the indicator computes:
Expected Value (R per trade)
Expected Value per month
Break-even win rate (cost-adjusted)
Edge vs break-even (percentage points)
Risk-of-ruin proxy (fixed-fractional approximation)
Estimated sample size needed to validate your win rate at a chosen confidence level
All values are expressed in R-units, not currency, to remain portfolio-independent.
How to use it
Enter honest assumptions — not best-case backtest results.
Observe:
Is EV meaningfully positive?
How small is the margin above break-even?
How many trades are required before results are statistically meaningful?
Decide whether the strategy is worth:
testing,
refining,
or discarding.
If the math fails here, execution quality will not save it.
What this tool is not
❌ Not a strategy
❌ Not a signal generator
❌ Not a performance backtest
❌ Not a guarantee of results
It is a reality check, not a promise.
Notes on methodology
Expectancy is computed in standard R-unit form.
Break-even win rate is adjusted for per-trade costs.
Risk-of-ruin is a proxy, based on a Lundberg-type root for i.i.d. outcomes under fixed fractional risk.
Sample size guidance uses a normal approximation for binomial confidence intervals.
All calculations assume stationarity — real markets may violate this.
Use judgment.
Who this is for
Traders designing rule-based systems
Traders comparing multiple strategies
Traders tired of “high win rate” marketing
Anyone who wants math before emotion
Final note
A strategy with:
high win rate but negative expectancy
or positive expectancy but no statistical margin
is not an edge — it’s noise.
Systems over feelings.
This tool focuses on math.
Expectancy Reality Check is a symbol-agnostic calculator that shows whether your assumed edge is mathematically viable — before you trade it.
It does not generate signals.
It does not predict price.
It exists to answer one question:
“If my assumptions are correct, does this strategy deserve capital?”
What this tool does
Given your assumptions for:
Win rate
Reward-to-Risk (R)
Costs per trade
Risk per trade
Trade frequency
the indicator computes:
Expected Value (R per trade)
Expected Value per month
Break-even win rate (cost-adjusted)
Edge vs break-even (percentage points)
Risk-of-ruin proxy (fixed-fractional approximation)
Estimated sample size needed to validate your win rate at a chosen confidence level
All values are expressed in R-units, not currency, to remain portfolio-independent.
How to use it
Enter honest assumptions — not best-case backtest results.
Observe:
Is EV meaningfully positive?
How small is the margin above break-even?
How many trades are required before results are statistically meaningful?
Decide whether the strategy is worth:
testing,
refining,
or discarding.
If the math fails here, execution quality will not save it.
What this tool is not
❌ Not a strategy
❌ Not a signal generator
❌ Not a performance backtest
❌ Not a guarantee of results
It is a reality check, not a promise.
Notes on methodology
Expectancy is computed in standard R-unit form.
Break-even win rate is adjusted for per-trade costs.
Risk-of-ruin is a proxy, based on a Lundberg-type root for i.i.d. outcomes under fixed fractional risk.
Sample size guidance uses a normal approximation for binomial confidence intervals.
All calculations assume stationarity — real markets may violate this.
Use judgment.
Who this is for
Traders designing rule-based systems
Traders comparing multiple strategies
Traders tired of “high win rate” marketing
Anyone who wants math before emotion
Final note
A strategy with:
high win rate but negative expectancy
or positive expectancy but no statistical margin
is not an edge — it’s noise.
Systems over feelings.
Skrypt open-source
W zgodzie z duchem TradingView twórca tego skryptu udostępnił go jako open-source, aby użytkownicy mogli przejrzeć i zweryfikować jego działanie. Ukłony dla autora. Korzystanie jest bezpłatne, jednak ponowna publikacja kodu podlega naszym Zasadom serwisu.
Wyłączenie odpowiedzialności
Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.
Skrypt open-source
W zgodzie z duchem TradingView twórca tego skryptu udostępnił go jako open-source, aby użytkownicy mogli przejrzeć i zweryfikować jego działanie. Ukłony dla autora. Korzystanie jest bezpłatne, jednak ponowna publikacja kodu podlega naszym Zasadom serwisu.
Wyłączenie odpowiedzialności
Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.