Price channel of 55 periods fails when it crosses with the PC of 20 periods - page 2

 
William Roeder:
What issue? I already said “Your posted code has nothing to do with your images.”

The images show the graphical Price Channel I want to copy with my code. The code is the way I'm trying to copy the graphical indicator. The issue is that the graphical and the programmed indicator don't match all the time. I'm asking for help because I don't understand why they don't match.

 
Donchian Channel is always outside of price, your images are not.
 
William Roeder:
A  Donchian Channel is always outside of price, your images are not.

Yes, the images come from the Price Channel programmed by Xaoc, source here: https://www.mql5.com/en/code/8044. In the images the bars break the channel because, I believe, it is delayed one bar. The Donchian Channel is always outside of price because it is not delayed. I want my channel to be delayed as well, and I don't know why it isn't working.

Reason: