Risk Management & Position Size Dashboard

aj7919 Mis à jour   
Risk Management and Position Size Calculator

This indicator is designed to assist traders by instantly providing the necessary information to execute orders based on defined risk parameters. This is not an indicator that tells you WHEN to buy or sell, but HOW MUCH to buy or sell based on your risk appetite. The indicator is compatible with any strategy and any instrument

The indicator uses some great pinescript features, allowing you to drag and drop your levels directly on the chart for instant feedback from the risk management dashboard. Huge timesaver.

1. The first time you add the indicator to your chart, you will be asked to identify your Entry, Stop and Target levels by clicking on them directly on the chart. You can at any point adjust these levels directly on the chart, or you can manually enter them in settings

2. Setup your risk profile in the indicator settings:
(a) Current Capital: Enter the current value of your trading account
(b) Max Risk Per Trade: Enter the maximum % of your Capital you want to risk per trade
(c) Max Leverage: Enter the maximum leverage you want applied to your account. This comes in handy when you trade on very low timeframes where position sizes can become very large. No matter what you enter here, position size will never exceed Max Risk Per Trade
(d) Stop Ticks: Number of ticks to use above/below the identified high/low for stops
(e) Use Current Price as Entry (Market Orders): By default, the system will use the entry level you have selected for limit orders. If you want to use the system to display data based on current price for market orders, select “Use Current Price as Entry (Market Orders)”

3. Based on your stop and target levels, the system will automatically display the dashboard for Longs (bottom of screen) or Shorts (top of screen). The levels will also be displayed to the right of the current price bar

4. Display Free Trade Level: toggle this on to display the level you should exit 50% of your position to make the trade risk free

5. Dashboard / Text size and level colours and positions are customisable

The Dashboard displays the following information at all times:

1. Entry
2. Stop
3. Trade Risk (%): Percentage price difference between Entry and Stop
4. Max Risk ($): Currency value of loss if the trade is stopped out
5. Size: Position Size to execute your trade based on your risk profile/appetite
6. Size($): Position Size in currency value
7. P&L($): Potential profit to your Capital in currency value
8. P&L(%): Potential profit to your Capital in %
9. R:R: Risk to Reward Ratio
10. % to Target: Percent price needs to move to achieve your target

Hope this helps you with your trading. I built this as I was tired of wasting time opening up spreadsheets or calculators to execute trades - especially on lower timeframes. Making the code open source so if you do make improvements to this I'd love to hear from you. Also open to suggestions.

Happy Trading!
Notes de version: updated screenshot
Notes de version: Aesthetic Update:
Added option to colour fill :
- trade risk to entry; and
- entry to target levels
Adjustable in settings
Notes de version: Added ability to adjust the levels position on the chart - allowing for multiple instances of the indicator to be applied simultaneously. Useful for hedging.
Notes de version: Bug fix
Notes de version: Updated to include fee per trade as an input. Used to:
- Calculate and Display Net Target P&L
- Calculate the actual Free Trade level
Notes de version: fixed incorrect calculation for free trade using fees
Notes de version: - Added "Risk to Account" to the dashboard. This is the total risk to your account factoring in fees. This is useful to keep an eye on especially if leverage is high. If Risk to Account is greater than your Max Risk Per Trade appetite, then you want to consider reducing your position size before pulling the trigger

- Fixed a bug in the free trade level.
Script open-source

Dans le véritable esprit de TradingView, l'auteur de ce script l'a publié en open-source, afin que les traders puissent le comprendre et le vérifier. Bravo à l'auteur! Vous pouvez l'utiliser gratuitement, mais la réutilisation de ce code dans une publication est régie par le règlement. Vous pouvez le mettre en favori pour l'utiliser sur un graphique.

Clause de non-responsabilité

Les informations et les publications ne sont pas destinées à être, et ne constituent pas, des conseils ou des recommandations en matière de finance, d'investissement, de trading ou d'autres types de conseils fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.

Vous voulez utiliser ce script sur un graphique ?