OPEN-SOURCE SCRIPT

Stop Loss Panel

By DannyBaker
Updated
Here is a label panel that shows the stop-loss number for Long or Short trades based on volatility using average true range and and a mult of that.
Release Notes
I made it easier to see on all timeframes, and made it possible to adjust how many decimal places the numbers shown have.
Release Notes
update to chart
Release Notes
Added Take profit and Current Price. The price changes color to green if there is a higher low and changes color to orange if the is a lower high, there is a look back adjustment for this, if set to 2 it would need 2 consecutive higher lows or lower highs, it turns silver if neither have happened
Release Notes
Added a "In Profit" level based on the trading fees, for those that trade on the lower timeframes
Release Notes
The panel position can now be adjusted from the settings
Release Notes
Added Risk and Reward percentages
Release Notes
Display update
Release Notes
The Risk Reward Percentages take the Fee setting into account
Release Notes
Added some description to settings panel
Release Notes
Added a switch to account for round trip fees for Roundtrip fees on Entries and Exits
Release Notes
Changed the colors to be clearer
Release Notes
Changed it a bit so you can set your risk amount
Release Notes
Changed the view
Release Notes
Fixed a bug in the fees on off
Release Notes
Finally adjusted it so only the risk and reward account for the fees
Release Notes
Cleaned up some errors
Release Notes
I have taken the accounting for the fee option out as my math incorrect
Release Notes
You can now enter the price manually
Release Notes
Deleted enter price manually as it was buggy.
Release Notes
I added a contract value so you can see how many contracts you need to trade as well as the dollar amount
Release Notes
a little adjustment to adjust the contract value by 0.1 steps
Release Notes
i added the option to shrink the panel display
Release Notes
The contract display does not round of anymore and its updated to pinescript version 5
Release Notes
Added manual entry for Price Entry and Stop Loss. Also, there is a leverage display showing the amount you will need to complete the trade.
Release Notes
Added manual take profit entry
Release Notes
Updated Chart.
Release Notes
Updated the reward display to include leverage
Release Notes
Minor Update
Release Notes
Added Margin and reward in cash.
Release Notes
Fixed some maths
Release Notes
I added to the display the measurement of profit margin. So you know know what the amount in percentage is to be in profit. Taking into consideration the amount of leverage you are having to put on.
Release Notes
The Profit Margin display basically accounts for the exchange fees on the leveraged cash total you trade.
Release Notes
a few small updates
Release Notes
Update of chart
Average True Range (ATR)stop-lossstoplossstopsVolatility

Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in publication is governed by House rules. You can favorite it to use it on a chart.

Want to use this script on a chart?

Disclaimer