Paint candles if above or below TEMA?

A

arod49

New member
im looking for bars to be painted blue if TEMA is above variable moving average thanks.
 
T

tomsk

Well-known member
VIP
@arod49 As requested, here is the code do paint candles per your condition

Code:
AssignPriceColor(if TEMA() > VariableMA() then Color.Blue else Color.CURRENT);
 
T

tomsk

Well-known member
VIP
Sure they are unless the ticker symbol on your chart does not have this condition. As an example load that study on a 30 min chart of INTC, you'll see this condition
 
A

arod49

New member
I see that they painted now but when I set them to different settings they don't get colored for example TEMA 10 and VMA 50 none of the bars get pained
 
T

tomsk

Well-known member
VIP
The default lengths for the TEMA and VariableMA are 10. So since you like to use TEMA(10) and VariableMA(50), use the following study and load it on say a daily chart of INTC. It does paint blue candles

Code:
AssignPriceColor(if TEMA(length = 10) > VariableMA(length = 50) then Color.Blue else Color.CURRENT);
 
Thread starter Similar threads Forum Replies Date
B Volume Paint Bars Questions 3
T How to make indicator paint behind price Questions 12
S Paint Candle touching 500 SMA Questions 7
Yo Adrian How to paint the active candle? Questions 5
Pelonsax Need help paint horizontal pivot lines Questions 5

Similar threads

Top