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.
Best of luck in all you do. Get money.
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.