```
def AO = Average(hl2, 5) - Average(hl2, 34);
def Zero = 0;
plot signalline = Average(AO, 5);
def ROCup_Accelerating = if AO > zero then 1 else 0;
def ROCup_Slowing = if AO > zero and AO < signalline then 1 else 0;
def ROCdown_Accelerating = if AO < zero then 1 else 0;
def ROCdown_Slowing = if AO < zero and AO > signalline then 1 else 0;
AddLabel(ROCup_Accelerating, "ROC Up & growing", color.black);
AddLabel(ROCup_Slowing, "ROC Up & slowing", color.black);
AddLabel(ROCdown_Accelerating, "ROC Down & growing", color.yellow);
AddLabel(ROCdown_Slowing, "ROC Down & slowing", color.yellow);
AssignBackgroundColor(if ROCup_accelerating then color.orange else if ROCup_Slowing then color.blue else if ROCdown_Accelerating then color.blue else color.orange);
```