Trend Channel [Gu5]

gu5tavo71 Updated   
SMA 200 determines the trend
Bullish trend, green candles. Down trend, red candles.
If the market value is narrow to the SMA200 channel, yellow candles.
Setting recommended for SMA Range
BTCUSD = 100
EURUSD = 1000
SPX = 100
Release Notes:
Update to Pinescript v.4
Clean code
Channel changes color too
Release Notes:
bcolor change
Release Notes:
Channel change
Release Notes:
Clean code
Release Notes:
Now it is compatible with any market, without manual setting
Release Notes:
Clean code
Release Notes:
Upgrade v5.
Added multiple types of Moving Averages ('SMA', 'EMA', 'SMMA', 'WMA', 'VWMA')
Written according to PineCoders Coding Conventions for Pine
Multiple Time Frame Indicator or MTF
Not repaint
Change of license

Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.


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.

Want to use this script on a chart?