Change background colour when ADX

 

Hi,

I've been on this for two days now and cimply cannot find a way to do this. I've been looking into using OBJ_RECTANGLE to shade my chart grey when price is ranging (ADX<25) but simple cannot get it working. Most examples of OBJ_RECTANGLE seem to be to shade trading times (e.g. London Session) but I want my chart to shade grey when price is ranging.

PLEASE help, I simply can't get my background shading grey when ADX(14)<25.

Thanks

James

 

If you have some code to show, show it.