Its purpose is to gradually build a position in a trending market (as of June 26th 2016 in most cryptocurrencies).
- direction (long/short)
- close positions (yes/no to only increase positions)
- buy/sell/close signals plotted on a chart below
This script can easily be used as a TradingView study (for alerts) and a strategy (for backtesting). See the comments in the code.
I have added additional alert conditions to be used easily together with a trading bot reading the signals: wolfbot org /strategies/tradingview-signal-strategy/
Yet obviously you can also do manual trading on each alert.