Abstract This script provides a set of Trendline Channels which can be tighter than Donchian Channels. This script computes the most suitable active upper and lower trendlines and updates them as soon as possible. We can use it for breakout signals earlier than Donchian Channels.
Introduction Channels are tools which can mark area of values of ranging markets. Once the price leaves the original region, range traders may start admitting they are wrong and trigger trend. Donchian Channels (misheard as Dungeon Channels) use the highest and the lowest price to define area of values. When the price breakouts, it just like it got released from a dungeon. However, waiting for the price making even higher or lower may be too late and risk reward ratio may be lower. Trendlines can make the channels tighter and we can find earlier breakout signals.
Computing Trendline Channels (1) Find the most active trendlines In this script, a valid trendline connects two high values or two low values. A high value means the highest value in a trading day. A low value means the lowest value in a trading day. In this script, every trendline does not crossover any bar but can exactly touch them. The most flat trendline is taken. (one for upper and one for lower) (2) Continue to use or Change a trendline If there is a tighter trendline available, this script changes to use it. If the previous active trendline is broken, this script re-computes the trendline available. When this case happens, this script display with an another color. Otherwise, this script continues using the previous trendline. (3) Middle line The middle line indicates the middle value between the upper and the lower.
Parameters Length : how many days are used for computation. The default value is 16 just because 16=4*4, using binary characteristic. x_go_on : If the previous trendline is not breakout and there are no tighter trendlines available, we continue use it.
Color Options (1) Upper trendline (no update or tighter) (2) Upper trendline (changed due to breakout) (3) Middle line (4) Lower trendline (no update or tighter) (5) Lower trendline (changed due to breakout)
Conclusion Trendline Channels can be tighter than Donchian Channels and evaluate earlier breakout signals. Comparing to known auto trendline scripts, Trendline Channels is continuous. Once a trendline is broken, Trendline Channels can instantly point out the next available one. If you think the price movement is boring or you cannot have good risk reward ratio, you can go to an another timeframe.
Reference How to trade with Donchian Channels How to trade with Trendlines
In pieno spirito TradingView, l'autore di questo script lo ha pubblicato open-source, in modo che i trader possano comprenderlo e verificarlo. Un saluto all'autore! È possibile utilizzarlo gratuitamente, ma il riutilizzo di questo codice in una pubblicazione è regolato dal nostro Regolamento. Per aggiungerlo al grafico, mettilo tra i preferiti.
Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.