DEV Community

Shahid
Shahid

Posted on

How do I calculate how many shares to buy based on ATR and risk management?

One of the most common questions I see from traders is: "I like this setup — but how many shares should I buy?"

Most people guess. Or buy a round number. Or deploy whatever cash they have.

Here's the systematic answer using ATR.


The Framework

ATR(14) tells you how much a stock moves on an average day. Using that as your stop foundation means your stop is calibrated to the stock's actual volatility — not an arbitrary percentage.

Step 1 — Stop Distance
Stop Distance = ATR × Multiplier

  • 2× ATR → short-term / swing trades
  • 3× ATR → positional / long-term (recommended)
  • 4× ATR → very wide, for high-volatility stocks

Step 2 — Risk Budget
Risk Budget = Capital × Risk %
Standard: 1% of capital per trade.
₹1,00,000 capital → ₹1,000 max loss per trade

Step 3 — Position Size
Units = Risk Budget ÷ Stop Distance


Example (round numbers)

Stock price: ₹500 | ATR(14): ₹5 | Capital: ₹1,00,000

ATR Mult Stop Dist Stop Price Units Deployed Max Loss
₹10 ₹490 100 ₹50,000 ₹1,000
3× ★ ₹15 ₹485 66 ₹33,000 ₹990
₹20 ₹480 50 ₹25,000 ₹1,000

Notice the max loss stays ~₹1,000 across all levels. The multiplier controls stop tightness — not your risk amount. Your position size automatically adjusts.


The YOLO trap

Buying 200 units (full ₹1L deployed) with a 3× ATR stop risks:
200 × ₹15 = ₹3,000 = 3% of capital in one trade.

Across 4 simultaneous positions that's 12% exposure. One bad week is devastating.

ATR position sizing keeps each trade capped at 1% regardless of entry price or volatility level.


Free Calculator

I built a browser-based tool that does all this math instantly — enter your ATR, entry price, capital and risk %, and it simulates across all multiplier levels with a comparison table and charts.

🔗 https://trade-atr.sk7.workers.dev/

No login, no signup — runs entirely in your browser.

Top comments (0)