OPEN-SOURCE SCRIPT

MYND Risk-Based Position Size Calculator [v1.5]

4 314
MYND Risk-Based Position Size Calculator [v1.5]

A standalone position-sizing calculator with 3 selectable risk philosophies - Fixed % Risk, Van Tharp R-Multiple/Expectancy, and Kelly Criterion - plus an optional Break-Even Trigger, a 3-tier Partial Profit-Taking Ladder, a Losing-Streak Survivability estimate, a Risk:Reward Ratio readout, live milestone status tags, a live P&L row, and a ladder allocation check.

WHAT IT DOES

Answers "given my account, my entry, my stop, and my chosen risk philosophy, how many shares/contracts should I actually put on" - a calculator, not another chart signal.

HOW IT WORKS

Fixed % Risk is the industry-standard baseline: position size = (Account Equity x Risk%) / Stop Distance. Van Tharp R-Multiple/Expectancy uses the same math but gates it on a positive Expectancy first, computed from your own supplied Win Rate / Average Win (R) / Average Loss (R) via Van Tharp's textbook formula. Kelly Criterion computes a dynamic risk% from your supplied Win Rate and Win/Loss Ratio using the classic f* = p - q/b formula, applied within the same stop-distance sizing formula (a disclosed practitioner adaptation, not a literal full-bankroll wager), with a Kelly Fraction Multiplier (Half-Kelly by default) on top.

This tool has NO access to your actual trade history - it is not a strategy backtester. The Van Tharp, Kelly, and Losing-Streak Survivability inputs are numbers you supply from your own trading record.

KEY FEATURES

A live dashboard showing every step of the calculation, including live status tags and P&L. A Max Position Size safety cap always applied on top of whichever mode's raw output. Up to 7 reference lines plotted directly on the chart, each with an optional price label. Full Total Control, Light/Dark/Custom theme plus a Colorblind-Safe Okabe-Ito palette, full tooltip coverage on every non-obvious setting, and Combo Alert Bundling.

HOW TO USE IT

Set your Account Equity, Direction, Entry Price, and Stop Method. For an actual open trade, set a fixed Entry Price so Live P&L and the [REACHED] tags mean something. Start with Fixed % Risk if you don't have reliable win-rate/R-multiple stats yet. Check the Risk:Reward Ratio and Ladder Allocation Check rows as quick sanity checks. Turn on the Partial Ladder if you scale out of positions, and the Break-Even Trigger if you follow a move-to-break-even habit.

SETTINGS WORTH TUNING FIRST

Account Equity + Risk % of Equity Per Trade. Max Position Size (% of Equity). Entry Price - fixed vs. 0/live close. Risk % Warning Threshold. Partial Ladder Tier R-Multiples/%. Milestone Status Lookback (bars) - increase for trades held longer than 100 bars.

ALERTS

11 individual alertcondition()s (Negative Expectancy Warning, No Kelly Edge Warning, Position Capped by Max Size, Zero Stop Distance Warning, High Risk % Warning, Ladder Over-Allocated Warning, Break-Even Trigger Reached, Take-Profit Target Reached, Partial Ladder Tier 1/2/3 Reached) plus 2 combo bundles (ALL Risk Warnings, ALL Trade Management Milestones).

This tool does not evaluate whether any trade is a good idea - every number is a mechanical consequence of the inputs you provide, and the Van Tharp/Kelly/Streak-Survivability inputs are only as good as your own supplied historical stats. This tool is provided for informational and educational purposes and does not constitute financial advice. Trading involves risk; past performance and historical patterns do not guarantee future results.

免責事項

これらの情報および投稿は、TradingViewが提供または承認する金融、投資、取引、またはその他の種類の助言もしくは推奨であることを意図したものではなく、またこれらに該当するものでもありません。詳細は利用規約をご覧ください。