In my data I'm looking at 20 day highs and lows of a security. Hence the upper channel is the 20 day high and lower channel is the 20 day low. This is my graph of the 20day high/low (white band) and last prices (green band):
It seems that prices never break out of the price channel . I then decided to lag the price channel by 20 days:
Is this the correct way to go about looking at price channel breakouts? I'm trying to have something run in R to recognize when a breakout occurs. Consequently, I need a concrete arithmetic expression for when breakout occurs. However, this is really difficult in the first graph because the prices barely touch the channels.