Mark the five anchors before the breakout
For rising valleys, label the sequence L1, H1, L2, H2, L3. Require L1 < L2 < L3. For falling peaks, label H1, L1, H2, L2, H3 and require H1 > H2 > H3. Bulkowski also describes similarly formed valleys or peaks; choosing comparable swings still involves judgment. Three adjacent candles are not automatically three separate turns.
- Here, neckline means that fixed horizontal confirmation line. The line connecting the three lows or highs tracks the slope of the structure, not its closing breakout threshold.
- The two intervening peaks need not rise in the bullish case; the two intervening valleys need not fall in the bearish case. Evaluate their extreme when fixing N.
| Structure | Horizontal confirmation line N | Closing confirmation |
|---|
| Three rising valleys | N = max(H1, H2) | Completed close above N |
| Three falling peaks | N = min(L1, L2) | Completed close below N |
A repeatable rule set for TradingView chart review
Use standard candles and keep the symbol, timeframe and session fixed. The following settings are illustrative choices for this page, not TradingView defaults or optimized trading parameters. Apply them before examining the later price path.
- Fixed price-unit thresholds do not transfer unchanged between instruments. Percentage or volatility thresholds require a separately stated formula.
- Do not skip an inconvenient middle pivot to improve the picture. Log rejected sets as well as accepted ones.
| Decision | Illustrative rule |
|---|
| Confirmed swing | A low is strictly below the three lows on each side; a high is strictly above the three highs on each side. Reject ties. |
| Selection | Use the latest three confirmed lows or highs. Require 8 to 30 bars between each pair and at least 1 price unit of rise or fall at each step. |
| Intervening turns | For each low-to-low interval, use its highest high; for each high-to-high interval, use its lowest low. Exclude the endpoint bars. Require at least 3 units of rebound or pullback relative to both adjacent anchors. |
| Candidate snapshot | At the close confirming the third pivot, freeze the five anchors and N. Allow one active candidate per direction. |
| Alert event | From eligibility, require previous close ≤ N and current close > N for rising valleys; reverse the inequalities for falling peaks. Emit only the first event. |
| Expiry | Allow the eligibility bar plus the next 19 bars. If no event occurs, expire the candidate. Require a newly confirmed pivot before considering another set. |
Worked example: the third valley is visible before it is usable
Assume hypothetical lows of 100, 104 and 107 occur at bars 10, 22 and 34. The intervening highs are 112 at bar 16 and 111 at bar 28. Both intervals are 12 bars; the rises are 4 and 3 units. The smaller rebound above an adjacent low is 111 minus 107 = 4 units, so these values pass the example geometry rules. N = max(112, 111) = 112.
- The example has a three-bar pivot delay and another two bars until breakout, for five bars from the third low to the event. This is a schematic sequence, not a measured market result.
- If price crossed 112 at bar 36, the detector could not use that crossing yet. This rule requires a fresh crossing at or after bar 37; it never backdates an alert to 36.
- For a mirrored bearish example, highs 120, 116 and 113 with intervening lows 108 and 110 give N = 108. A close of 109 breaks the second valley but not N; a move from 108.4 to a completed close of 107.8 qualifies once the third high is confirmed.
| Bar | Available information | Decision |
|---|
| 34 | Low reaches 107; future bars do not yet exist | L3 is provisional. |
| 37 close | Three later lows all exceed 107, and the left-side check passes | L3 becomes confirmed; candidate is first eligible. |
| 38 close | High reaches 112.4; close is 111.8 | A wick above N does not pass the closing rule. |
| 39 close | Close is 112.3 after 111.8 | First eligible closing crossing; record the event at 39. |
| 56 close | Alternative path: no crossing occurred during bars 37 through 56 | Expire the candidate after its 20-bar window. |
Define cancellation separately from a failed breakout
For this custom rule set, cancel a rising-valley candidate on a completed close below its saved L3; cancel a falling-peak candidate on a close above its saved H3. Check all closes after the third anchor when creating the candidate, then check each new close while waiting. These are conservative design choices, not universal definitions of the named patterns.
- A return through N can warn that the breakout is weakening without meeting the chosen failure rule. Changing failure to a neckline recross produces a different test.
- Cancellation and expiry end a candidate without an alert. Failure occurs after an alert. Combining them would hide how many candidates never triggered.
- An alert event is not an executable trade plan. Order timing, exits, position size, gaps and costs still need separate rules.
| Case | Example outcome |
|---|
| Broken ordering | Lows 100, 104, 103 fail the rising requirement. Equal lows 100, 104, 104 fail the strict rule too. |
| Candidate cancellation | With L3 = 107, a close at 106.9 cancels the bullish candidate. A close exactly at 107 does not. A wick below 107 alone does not meet this close-based cancellation rule. |
| Bearish cancellation | With H3 = 113, a close at 113.1 cancels; a close exactly at 113 does not. |
| Breakout failure record | After a bullish event, record the first later close below 107 as failure under this rule. After a bearish event, use the first later close above 113. Keep the original event in the log. |
Compare with triple bottoms and triple tops
TradingView describes triple bottoms and tops as three turns near the same price, allowing small differences. That equality requirement is different from a deliberately rising or falling sequence. Small steps can satisfy both a broad equality tolerance and a strict ordering rule, so a detector also needs a minimum step or a policy for overlapping labels.
| Pattern | Anchor relationship | Illustrative classification |
|---|
| Three rising valleys | Each low is higher | 100, 104, 107 passes the 1-unit minimum step. |
| Triple bottom | All three lows fit a stated tolerance band | 100, 100.2, 99.9 fits a 0.5-unit total spread. |
| Three falling peaks | Each high is lower | 120, 116, 113 passes the 1-unit minimum step. |
| Triple top | All three highs fit a stated tolerance band | 120, 119.8, 120.1 fits a 0.5-unit total spread. |
Review the anchors, then specify an alert
On TradingView, label the five anchors and the horizontal N line, then write the third-pivot detection bar beside its original bar. TradingView documents that pivot drawings can appear on historical candles only after later candles confirm them. Use a completed-bar review to check whether each event was actually knowable at the recorded time.
- Annotate a screenshot with the symbol, timeframe, anchor prices, N and cancellation level before using AI Chart Analysis. Compare its chart-pattern and price-level interpretation with your own count; cropped history or unclear axes can change that interpretation.
- After resolving the count, give the Pine Script AI Coding Agent the pivot, spacing, minimum-step, crossing, cancellation and expiry rules. Ask it to preserve anchor and detection timestamps separately.
- Request a syntax check on generated code, then compare its events with the worked sequence and rejected cases. Syntax validation does not prove correct swing selection or profitable signals.