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

Broker Special Offers

Intraday Higher Leverage

Save up to 90% in brokerage and get higher leverage for intraday trades.

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