Alex_K13

Custom Candle Body Color and EMA Crossover Indicator

We determine if the price is below EMA 9 by comparing the close price with EMA 9.
We determine if the current candle body is huge compared to the previous candle's body.
We plot EMA 9 in black color and EMA 200 in green color.
We plot blue triangles below the bars for EMA crossover above and red triangles above the bars for EMA crossover below.
We set the color of the candle body to red if the price is below EMA 9 and to green if the price is above EMA 9, only when the current candle body is huge compared to the previous candle's body.
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.

Disclaimer

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?