OPEN-SOURCE SCRIPT
업데이트됨

DTC Lot Size Calculator

2 623
You set an Entry Price and Stop Price (click-to-place on the chart, or type them in). The script works backward from your risk percentage to tell you exactly how large a position you can take — lot size for forex/CFDs, or whole contracts for futures — so that a stop-out costs exactly what you intended to risk, not more.

It plots Entry, Stop, and R-multiple target lines (1R, 2R, 3R...) directly on the chart, and a compact table shows the full breakdown: risk amount, position size, commission, spread cost, required margin, and the resulting reward:risk ratio.

How the sizing works

Position size is solved from your planned Entry/Stop distance, not a live-recalculated one, so the lot size stays stable and doesn't silently drift every time price ticks. An optional "Reset entry to live price" toggle lets Entry track the current close while Stop stays fixed, so you can watch how a live-tracking price affects real risk without re-plotting manually every time.

True Risk (not just the target risk %) accounts for commission and spread cost, so the number you see is what you'd actually lose, not an idealized figure.

Futures contracts (ES, MES, NQ, MNQ, YM, MYM, RTY, M2K, CL, MCL, NG, GC, MGC, SI, HG, ZB, ZN, ZF, 6E, 6J, 6B, 6A, ZC, ZS, ZW, and CME BTC/ETH) use their real exchange tick size and tick value, and size in whole contracts only, no fractional micros. Spot metals (XAUUSD, XAGUSD, XPTUSD, XPDUSD) use standard 100oz/5000oz/50oz lot conventions matching their COMEX futures equivalents, since these are commonly mispriced by generic calculators.

Built-in safety checks

Risk % turns red with a caution mark above a threshold you set (default 3%). Stop distance turns red with a caution mark if it's unusually wide for a forex pair (default 15 pips). Margin % estimates how much of your account the position would tie up at your configured leverage, and warns if it exceeds 100%, catching cases where a risk-correct position size is still too large for the account to actually hold. A second, independently configurable account/risk table can be shown side by side for comparing two account sizes or risk profiles at once.

Why this is a distinct build, not a re-skin

The original by cryptonnnite was a single-instrument forex lot size calculator. This version adds: multi-asset contract specs (futures + metals), the planned-vs-live entry distinction and its safety fallback, commission+spread-inclusive true risk, the margin/leverage check, configurable warning thresholds, a second comparison account, and the auto dark/light theme system, all new logic layered on top of the original risk-sizing concept.

릴리즈 노트
Added Live-lot size calculations.

면책사항

해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.