scalptradr

Bars Above/Below Donchian Channel [ScalpTradr]

scalptradr Zaktualizowano   
"Bars Above/Below Donchian Channel" provides a visualization of the Donchian Channel and measures the number of bars above and below the middle line of the channel.

The Donchian Channel is a trading indicator that outlines the highest high and the lowest low over a defined number of periods, in this case set by the variable "length". This indicator script specifically also calculates the 'basis', which is the average of the upper and lower channels of the Donchian Channel.

When the closing price of a bar is above the 'basis', the script increases a counter for "aboveCount" and adds a label on the chart to show how many bars have closed above the 'basis'. This label is green and it's always placed at the high price of the bar. Conversely, when the closing price is below the 'basis', it increases a counter for "belowCount" and adds a red label on the chart to show how many bars have closed below the 'basis'. This label is placed at the lower_channel level.

This script can be useful for traders who use the Donchian Channel as a part of their trading strategy. The number of bars closing above or below the 'basis' can provide insights into the ongoing trend. A higher count of bars closing above the 'basis' can be interpreted as a bullish signal, suggesting an upward trend. Similarly, a higher count of bars closing below the 'basis' can be interpreted as a bearish signal, suggesting a downward trend

I hope you find this indicator useful.

Enjoy.
Informacje o Wersji:
Update chart.
Informacje o Wersji:
Fix issue where above label not positioned correctly
Informacje o Wersji:
Added an option to set the color of the price bars to red or green depending on if price closes below or above basis
Skrypt open-source

Zgodnie z prawdziwym duchem TradingView, autor tego skryptu opublikował go jako open-source, aby traderzy mogli go zrozumieć i zweryfikować. Brawo dla autora! Możesz używać go za darmo, ale ponowne wykorzystanie tego kodu w publikacji jest regulowane przez Dobre Praktyki. Możesz go oznaczyć jako ulubione, aby użyć go na wykresie.

Wyłączenie odpowiedzialności

Informacje i publikacje przygotowane przez TradingView lub jego użytkowników, prezentowane na tej stronie, nie stanowią rekomendacji ani porad handlowych, inwestycyjnych i finansowych i nie powinny być w ten sposób traktowane ani wykorzystywane. Więcej informacji na ten temat znajdziesz w naszym Regulaminie.

Chcesz użyć tego skryptu na wykresie?