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.
Release Note
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.
Release Note
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.
Release Note
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 อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน