OPEN-SOURCE SCRIPT
更新済 Std Dev Projection + Risk Tool

Std Dev Projection + Risk Tool
A drag-based planning tool for NQ/MNQ (or any futures/instrument) that turns two anchor points — your Entry and your Stop — into a full trade plan: projected R-multiple targets, position sizing, and dollar risk, all updated live as you drag.
How it works: Drop two points on the chart: Entry (Level 0) and Stop (Level 1). Everything else is calculated automatically from that single leg:
Features
How to use
A
Disclaimer: This is a risk-calculation and visualization tool only — it does not generate trade signals, predict price direction, or execute trades. All position sizing outputs are for planning purposes; verify contract specs and risk parameters against your own broker/platform before trading. Trading futures involves substantial risk of loss and is not suitable for all investors. Past performance and projected levels are not indicative of future results.
A drag-based planning tool for NQ/MNQ (or any futures/instrument) that turns two anchor points — your Entry and your Stop — into a full trade plan: projected R-multiple targets, position sizing, and dollar risk, all updated live as you drag.
How it works: Drop two points on the chart: Entry (Level 0) and Stop (Level 1). Everything else is calculated automatically from that single leg:
- Direction (long/short) is auto-detected from where Stop sits relative to Entry
- R-multiple target lines (1R, 2R, 2.5R, 4R by default — fully customizable) project outward from Entry based on your stop distance
- Position sizing calculates your max contracts either as a % of account or a fixed $ risk amount per trade
- A risk summary table (top-right) shows stop distance, $ risk per contract, max contracts, and total $ risk at a glance
Features
- Micro (MNQ) / Mini (NQ) / Custom contract switcher — size your risk correctly even if you're charting one and trading the other
- Toggle labels to show $ amount, R-multiple, and/or contracts-to-risk independently
- Adjustable label offset so targets stay visible past your price action
- Two risk sizing modes: % of account or a flat $ amount per trade
- Fully customizable R-target levels (comma-separated list)
How to use
A
- dd to chart, open Settings
- Drag the Entry and Stop handles onto your actual planned trade
- Set your Contract Size, Risk Sizing Mode, and risk amount under Risk Management
- Read your position size and R-targets directly off the chart
Disclaimer: This is a risk-calculation and visualization tool only — it does not generate trade signals, predict price direction, or execute trades. All position sizing outputs are for planning purposes; verify contract specs and risk parameters against your own broker/platform before trading. Trading futures involves substantial risk of loss and is not suitable for all investors. Past performance and projected levels are not indicative of future results.
リリースノート
Update: Cleaner label layoutSimplified the on-chart labels so each one only shows what's actually useful at that level:
- Entry — now just shows "Entry" (no contract count, since it's not a risk figure)
- SL — still shows contract count and total $ risk (the one place that number matters)
- R-Targets (1R, 2R, 2.5R, etc.) — now show the $ profit potential only, contract count removed for a cleaner read
Net effect: less visual clutter on the target lines, with the sizing info concentrated where you actually need it — your stop.
リリースノート
Update: Suggested Entry lineAdded a safety-net line for setups where your stop is too wide to fit any contracts in your risk budget.
- If Max Contracts calculates to 0 (your stop distance × point value exceeds your risk budget), a dotted purple line now appears showing exactly where Entry would need to move — with Stop held fixed — to bring that same stop distance within budget for 1 contract
- Labeled "1x Entry $[budget]" so you can see the exact dollar figure it's solving for
- Automatically disappears once Max Contracts is 1 or higher — it only shows up when you actually need it
- Toggleable under the new "Suggested Entry (when 0 contracts fit)" settings group, including its own color option
Useful for quickly seeing how much closer your entry would need to be to make a wide-stop setup workable within your risk rules, without doing the math by hand.
リリースノート
Update: Risk table toggle & positioningAdded display controls for the risk summary table.
- Show Risk Summary Table — toggle the table off entirely if you'd rather keep the chart clean and just use the on-chart labels
- Table Position — 9 placement options (Top/Middle/Bottom × Left/Center/Right) so you can move it out of the way of your price action or other indicators, instead of being locked to the top-right corner
Both live under a new "Risk Table" settings group.
オープンソーススクリプト
TradingViewの精神に則り、このスクリプトの作者はコードをオープンソースとして公開してくれました。トレーダーが内容を確認・検証できるようにという配慮です。作者に拍手を送りましょう!無料で利用できますが、コードの再公開はハウスルールに従う必要があります。
免責事項
これらの情報および投稿は、TradingViewが提供または承認する金融、投資、取引、またはその他の種類の助言もしくは推奨であることを意図したものではなく、またこれらに該当するものでもありません。詳細は利用規約をご覧ください。
オープンソーススクリプト
TradingViewの精神に則り、このスクリプトの作者はコードをオープンソースとして公開してくれました。トレーダーが内容を確認・検証できるようにという配慮です。作者に拍手を送りましょう!無料で利用できますが、コードの再公開はハウスルールに従う必要があります。
免責事項
これらの情報および投稿は、TradingViewが提供または承認する金融、投資、取引、またはその他の種類の助言もしくは推奨であることを意図したものではなく、またこれらに該当するものでもありません。詳細は利用規約をご覧ください。