I need a ThinkScript that:
A single bubble is enough — just show the number of bars that have passed from the high to the low or vice versa, with a minimum of 50 bars.
We’ll take historical data up to 300 bars back.
My goal is to try to identify repeating (cyclical) patterns.
- Detects pivot highs/lows by bar confirmation: N bars to the right (default N = 50, user input).
- Shows exactly one bubble only when a pivot is confirmed (i.e., on bar t+N for a pivot at t):
- Green bubble for confirmed pivot high, red for confirmed pivot low (black text).
- Bubble text = bar count between the previous confirmed pivot and this pivot.
A single bubble is enough — just show the number of bars that have passed from the high to the low or vice versa, with a minimum of 50 bars.
We’ll take historical data up to 300 bars back.
My goal is to try to identify repeating (cyclical) patterns.
Last edited by a moderator: