HELP Title - red when drop, green when rise

#1
Code:
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));

Code:
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.0f, %.1f%%) {{VALUES}}", O, H, L, C, SelectedValue(C-Ref(C,-1)), SelectedValue(  ROC( C, 1 ) ) ));
How do I make the color of "change and change %" to red if drop, green if rise

if (SelectedValue( ROC(C,1)) < 0 )
ROCFormat = EncodeColor(colorRed ) + SelectedValue( ROC(C,1) );
else
ROCFormat = EncodeColor(colorBlack ) + SelectedValue( ROC(C,1) );

I found out for the night, I can finally add the change in it, but I dont know how to make the color change. I have found the above code from the website, but don't know how to merge with my code. Please help.
 

Similar threads

Zerodha – Open Paperless Account

Open online account with Zerodha. Free delivery trading and Max Rs 20 for Intraday, F&O, Currency and Commodity Trading. Intraday High leverage with MIS, CO and BO.

Name:Phone:
Email:City:
State:
Are you a day trader?