OPEN-SOURCE SCRIPT

Risk Management & Position Size Dashboard

已更新
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.

Instructions:
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!
發布通知
updated screenshot
發布通知
Aesthetic Update:
Added option to colour fill :
- trade risk to entry; and
- entry to target levels
Adjustable in settings
發布通知
Added ability to adjust the levels position on the chart - allowing for multiple instances of the indicator to be applied simultaneously. Useful for hedging.
發布通知
Bug fix
發布通知
Updated to include fee per trade as an input. Used to:
- Calculate and Display Net Target P&L
- Calculate the actual Free Trade level
發布通知
fixed incorrect calculation for free trade using fees
發布通知
- 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.
發布通知
A multi timeframe Three moving averages indicator
averageExponential Moving Average (EMA)moving

開源腳本

在真正的TradingView精神中,這個腳本的作者以開源的方式發佈,這樣交易員可以理解和驗證它。請向作者致敬!您可以免費使用它,但在出版物中再次使用這段程式碼將受到網站規則的約束。 您可以收藏它以在圖表上使用。

想在圖表上使用此腳本?

免責聲明