"""Exclude current bar from a breakout channel.

Using current high in the trigger channel can change or invalidate the intended rule.
All inputs are synthetic teaching examples. Run: python 26_donchian-prior-channel.py
"""
from tv_math import *

highs=[10,11,12,15]
prior=max(highs[-4:-1])
assert prior==12 and highs[-1]>prior
print({'prior_high':prior,'current_high':highs[-1]})
