the
The
and
AND
to
order
TO
of
are
pivot
• Describing what you are looking for is rather easy.
• However, actually writing the ThinkScript for this indicator proved quite difficult.
• The basic market structure on any time frame are pivot highs and lows (also called swing highs or lows).
• A pivot high is a bar that has a higher high than the bar that came before it and the bar that comes after it.
• At least in the very short term, the bar’s high represents the high-water mark past which buyers were not able to push price, and can be considered a very minor source of potential resistance.