The purpose of this script is to trade with the trend, trade trend continuation, and counter-trend trades.
Uptrend is price above 200 ema: Background is green and the bar colors are normal
Downtrend is price below 200 ema: Background is red and the bar colors are normal
Counter-trend to uptrend--Bar colors are white and the background is purple
counter-trend to downtrend--Bar colors are black and the background is aqua.
How to use:
Uptrend (green background): Only go long
Downtrend (red background): only go short
Counter-trend to uptrend/downtrend (white bars/black bars): Take counter-trend trade when price is a substantial distance from the 200 EMA. Best if there was a divergence with an oscillator. A lot of times these are just deep pullbacks or rallies.
trend continuation: In uptrend, after falling knives, and trend continues up (background turns to green) look to buy, you are getting a great price on the asset. Same for downtrend.
Keep in mind that nothing is perfect, and to of-course test everything.
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 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.