Stop Loss Point and Lots Calculator @MaxMaserati

722
Stop Loss Point and Lots Calculator

A risk and level-mapping tool for order execution, built to work across any market. You set an entry price (live price, a past candle's open/high/low/close, or a manual override), and the script projects stop and target lines out from that price, converts each level into dollar risk, and calculates the contract or position size that matches your chosen dollar risk. Distances are read in whichever unit fits the instrument you're trading, detected automatically.

─── DISTANCE UNIT DETECTION ───
The script reads the symbol type and picks the correct measurement unit on its own: forex pairs use pips (0.0001, or 0.01 for JPY pairs), crypto uses ticks (the exchange's minimum price increment), and futures, stocks, indices, and metals use points (a full 1.0 price move). Metals are checked separately from other forex-type symbols, since gold and silver are often tagged as forex on this platform but are not traded in pips. Any of these can be overridden - force Points, Ticks, or Pips on any symbol regardless of what Auto would choose, or type an exact manual unit size if a symbol's auto-detected value doesn't match your broker.

─── POSITION SIZING ───
Contracts = Risk Amount divided by (Stop Distance in units times Dollar Value Per Unit). Example: a $2,000 risk amount with a 20-unit stop and a $20-per-unit instrument gives 5 contracts. Auto sizing recalculates this live from your Risk Amount input; Manual mode lets you fix the size yourself. Every line the script draws reads this size to show its dollar value.

─── ANCHOR AND STOP LEVELS ───
The anchor line is your entry price - live price, the prior candle's open/high/low/close, or a manual price for a limit order that hasn't filled yet. Tier 1 is your stop distance; Tier 2 is your target distance. Both draw as lines above and below the anchor with shaded zones between them, each labeled with distance, size, and dollar value.

─── ADVANCED LEVELS ───
Two optional extra tiers (3 and 4) extend further out for scaling targets or wider invalidation. A background grid can also plot every level at three step sizes (small, medium, big) between the anchor and your outermost active tier, so you can read the dollar cost of any price level on the chart, not just the tiers you defined.

─── SESSION HIGH AND LOW LINES ───
Optional lines for today's high/low and yesterday's high/low, each labeled with distance and dollar value from your anchor. Useful for checking whether your stop or target sits inside or beyond a level the market has already respected.

─── HOW TO USE ───
1. Set Distance Unit to Auto, or force Points, Ticks, or Pips if you trade a specific instrument type consistently.
2. Set Anchor Price to Manual Price Override and type in your limit order price, or leave it on Last Candle Open/Close to anchor off the most recent bar.
3. Set Tier 1 Distance to your stop - this becomes your stop-loss line.
4. Set Tier 2 Distance to your target - this becomes your take-profit line.
5. Read the label on each line for the exact size and dollar value at your chosen risk before placing the order.
6. If the anchor sits on or very close to today's or yesterday's high/low line, treat that as a level the market has already tested and reconsider distance or entry timing.

1- snapshot
2- snapshot
3- snapshot

─── SETTINGS ───
Position Sizing - distance unit selection, direction (long/short/neutral sign display), auto vs manual sizing, risk dollar amount, stop distance for the sizing formula, and which fields show on line labels.
Anchor and Stop Levels - anchor price source, manual override price, anchor and Tier 1/2 line styling, and Tier 1/2 distances.
Advanced Levels - optional Tier 3/4 distances and styling, plus the background grid with three step sizes.
Session High and Low Lines - toggle and style today's and yesterday's high/low lines.
Display Settings - line position and length offset from the current bar, label text size, and a manual unit-size override for instruments the auto-detection misreads.

─── NOTES ───
Today's and yesterday's high/low lines use a security call with lookahead intentionally enabled, because a completed day's high and low are historical values, not a forward-looking projection - this does not repaint the tier or anchor lines, which are all drawn from the live or last-closed price you select. Works on forex, crypto, futures, stocks, indices, and metals; the unit and its dollar value are detected per symbol, with a manual override available for any instrument.

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.