Indicator multi timeframe broken in backtest chart

 

Hi I have this indicator with higher timeframe setting. When I backtest the indicator, it shows somewhat broken indicator.

Here's the indicator on real chart,

and here's when I backtest it,

I tried another indicator that has multi timeframe setting and the result is the same. Every time I used a higher timeframe the indicator would be broken in backtest but if I used the current timeframe the indicator would works fine. Anyone knows why this happened?