Simple indicator that color the candlesticks according to:
Coded because of a request in the ProBuilder forum.
//PRC_TrendColored | indicator
//21.11.2018
//Nicolas @ www.prorealcode.com
//Sharing ProRealTime knowledge
// --- settings
period1 = 10
MA1type = 2
period2 = 50
MA2type= 2
// --- end of settings
avg1 = average[period1,MA1type]
avg2 = average[period2,MA2type]
if avg1>avg2 then
r=0
g=255
b=0
if avg1<avg1[1] then
r=0
g=128
b=0
endif
elsif avg1<avg2 then
r=255
g=0
b=0
if avg1>avg1[1] then
r=255
g=99
b=71
endif
endif
drawcandle(open,high,low,close) coloured(r,g,b)
return