OPEN-SOURCE SCRIPT
Updated AlphaTrend For ProfitView

This strategy is based on the AlphaTrend indicator by KivancOzbilgic https://www.tradingview.com/v/o50NYLAZ/ A full description of this algorithm functionality may be found by clicking the linked image above.
Changes and/or additions:
When you create an alert, and you are using ProfitView, select "alert() function calls only" as the condition option. If you would rather set your own custom alert message, select "Order fills only" instead.
There is a selectable setting in the options to trigger alert() function calls immediately, that you may use to see what text it will send.
Changes and/or additions:
- It is now a backtestable strategy
- Updated alert trigger logic
- Easy integration with ProfitView to use this algorithm for automated trading
When you create an alert, and you are using ProfitView, select "alert() function calls only" as the condition option. If you would rather set your own custom alert message, select "Order fills only" instead.
There is a selectable setting in the options to trigger alert() function calls immediately, that you may use to see what text it will send.
Release Notes
Add option to only allow longsOpen-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
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.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
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.