This particular strategy is only as example and not for actual trading, this code is only to be edited an used to transform your strategies into studies to get alerts
Release Notes
//The objective of this code is to transforma a strategy into a study and avoid pyramiding. You only have to copy the srategy code into the first part and //modify the "entry and exit definitions" with your own from your strategy
//This is a code for taking long and short positions and so the closing code. If you want to work in a buy/sell scenario this is not going to work as it is //functions declared are only as an examble and doesnt give a good result for actual trading
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.
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.