TradeAnatomy

Position Sizing Calculator for Stocks

This position sizing calculator uses moving averages to calculate position size.

Here's what you can do:

  • Set the moving average value

  • Calculate the moving average as simple or exponential

  • Set your risk % per trade

  • Set your account value

  • Use a custom stop instead of the moving average value

  • You can also set the maximum % of capital to risk per trade.

The number of shares and percentage of account value will display as a label above the last bar price. It will work on multiple timeframes, but you will need to adjust the moving average length based on your current chart settings. Position sizing and risk management are important aspects of trading which should not be overlooked.

An example of setting your risk % per trade:

The current default is .50% which means that a $100,000 portfolio is willing to lose $500 per trade. The same account using a 1% risk model would be willing lose $1,000.

An example of how position size is calculated:

Portfolio Value=$100,000 Risk %= .50 Entry =$50 Moving Avg Value=$45 Amount I'm willing to lose is $100,000 x.50%=$500 so $500/(50-45) is equal to 100 shares. 100 shares x 50=$5000 or 5% of my total portfolio value.

Best of luck!
Protected script
This script is published closed-source but you may use it freely. You can favorite it to use it on a chart. You cannot view or modify its source code.
Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.

Want to use this script on a chart?