Why Risk Management Matters More Than Strategy
A mediocre strategy with excellent risk management will outperform a great strategy with poor risk management. Risk management determines how much capital you retain to compound future gains. Without it, a single bad trade can wipe out months of profits.
Discover professional approaches at jayadevrana.com.
Position Sizing Methods
Fixed Percentage Method
Risk a fixed percentage of account capital per trade, typically 1-2%. For a ₹100,000 account risking 1% per trade:
Risk per trade = 100,000 × 0.01 = ₹1,000
Position size = Risk / Stop-loss distance
ATR-Based Position Sizing
Adjust position size based on current volatility using Average True Range:
ATR = ta.atr(14)
Risk_Distance = ATR × 2
Position_Size = Risk_Amount / Risk_Distance
During high volatility (large ATR), reduce position size. During low volatility (small ATR), increase it.
Kelly Criterion
The Kelly Criterion calculates optimal position sizing based on win rate and risk/reward ratio:
Kelly % = (Win Rate × Avg Win) - (Loss Rate × Avg Loss) / Avg Win
f = (bp - q) / b
where b = win/loss ratio, p = win probability, q = loss probability
Example: 55% win rate, 1:1.5 risk/reward = ~6% optimal position size.
Stop-Loss Types
Technical Stop-Loss
Place stops below support levels for long trades, above resistance for short trades:
//@version=5
strategy("Technical Stop", overlay=true)
support = ta.lowest(low, 20)
entry_price = close
stop_loss = support - (entry_price - support) * 0.05
ATR-Based Stop-Loss
Exit when price moves against you by a multiple of ATR:
atr = ta.atr(14)
long_stop = entry - atr * 2
short_stop = entry + atr * 2
Chandelier Stop
Trailing stop based on high/low over a period, adjusted by ATR:
chandelier = ta.highest(high, 22) - ta.atr(22) * 3
Implementing Risk Management in Pine Script v5
//@version=5
strategy("Risk Management System", overlay=true)
risk_pct = input(1.0, "Risk %")
account_size = input(100000, "Account Size (INR)")
rr_ratio = input(1.5, "Risk:Reward")
atr = ta.atr(14)
entry = close
risk_amount = account_size * (risk_pct / 100)
stop_distance = atr * 2
position_size = risk_amount / stop_distance
stop_loss = entry - stop_distance
take_profit = entry + (stop_distance * rr_ratio)
if ta.crossover(ta.sma(close, 20), ta.sma(close, 50))
strategy.entry("Long", strategy.long)
strategy.exit("Exit", "Long", stop=stop_loss, limit=take_profit)
Maximum Drawdown Limits
Set maximum monthly/quarterly drawdown limits. If reached, stop trading and reassess:
- Daily Loss Limit: Stop if down 2% on the day
- Weekly Loss Limit: Stop if down 5% in the week
- Monthly Drawdown: Maximum 10% portfolio drawdown acceptable
Portfolio-Level Risk Management
Don’t risk more than 5-10% of total portfolio on single trade. Diversify across multiple setups, timeframes, and assets to reduce correlation risk.
Practical Examples with Indian Stock Prices
Example: Trading RELIANCE (NSE:RELIANCE) at current price ₹2,750
- Account Size: ₹500,000
- Risk Per Trade: 1% = ₹5,000
- Stop-Loss Distance: ₹50 (ATR × 2)
- Position Size: ₹5,000 ÷ ₹50 = 100 shares
- Entry: ₹2,750
- Stop Loss: ₹2,700
- Take Profit (1:1.5 RR): ₹2,825
Chat on WhatsApp for personalized risk strategies
Need a Custom Pine Script Solution?
Jayadev Rana is a professional Pine Script developer who builds custom indicators, strategies, and automated trading systems for TradingView.