The trend up seem by green dots
Trend down seen by red dots
and the line red or green
I Set this one for 1 hour chart , try to play with settings for better optimization
So it nice system to detect trends
Happy new year to all members of TradingView
So link is for his code is
Try to change lines 6, 7 and 14 like this:
st_mult = input(title="ATR Multiplier", defval=1.5, minval=0, maxval=10, step=0.1,type=float ) //line 6
st_period = input(title="ATR Period", defval=5, minval=1, maxval=14, step=1,type=integer ) //line 7
percent = st_mult * atr( st_period )/close //line 14
This way, percent is adaptable to the volatility and you can change the time frame without wasting time finding the best parameter.
Credits go to Sylvain Vervoort in an article on the S&C magazine June 2013.