OPEN-SOURCE SCRIPT

Bedaiwi's Smart Pivots

535
Bedaiwi's Smart Pivots is a three-level market-structure indicator that classifies price turning points as Minor, Intermediate, and Major highs and lows.

HOW IT WORKS

Minor Pivots

A Minor High is confirmed when the middle bar of a three-bar formation has a high that is strictly higher than the highs immediately before and after it.

A Minor Low is confirmed when the middle bar has a low that is strictly lower than the lows immediately before and after it.

Equal highs and equal lows are not treated as Minor pivots.

Intermediate Pivots

Intermediate pivots are derived from confirmed sequences of Minor pivots.

An Intermediate High is identified when a higher Minor High is followed by a lower Minor High.

An Intermediate Low is identified when a lower Minor Low is followed by a higher Minor Low.

Major Pivots

Major pivots apply the same hierarchical logic to confirmed Intermediate pivots.

A Major High is identified when a higher Intermediate High is followed by a lower Intermediate High.

A Major Low is identified when a lower Intermediate Low is followed by a higher Intermediate Low.

SYMBOLS AND COLORS

- Red diamond: Intermediate High
- Green diamond: Intermediate Low
- Red exclamation mark: Major High
- Green exclamation mark: Major Low

Optional Minor pivots use the same High and Low color settings.

When the replacement option is enabled, an Intermediate symbol is removed and replaced with an exclamation mark if the same point is later promoted to Major status.

HISTORICAL PLOTTING AND CONFIRMATION DELAY

Pivot identification requires subsequent price information.

A Minor pivot is confirmed only after the following bar closes. Intermediate and Major pivots require additional confirmed pivot sequences, so their confirmation occurs later.

After confirmation, the indicator places the symbol on the historical bar where the relevant high or low occurred. Therefore, a symbol displayed on an earlier bar was not necessarily available in real time on that bar.

Historical placement is used only to show the actual location of the confirmed turning point. It should not be interpreted as a signal that was known on the historical pivot bar.

SETTINGS

Users can:

- Show or hide Minor pivots
- Show or hide Intermediate pivots
- Show or hide Major pivots
- Replace an Intermediate symbol when it becomes a Major pivot
- Customize High and Low pivot colors

PRACTICAL USE

Smart Pivots can help users:

- Study market structure
- Identify significant historical swing highs and lows
- Separate short-term fluctuations from higher-level price structure
- Review possible support and resistance areas
- Add context to discretionary price-action analysis

LIMITATIONS

Smart Pivots is an analytical indicator. It does not place trading orders and does not define entries, exits, stop-loss levels, profit targets, position sizing, or expected returns.

Pivot confirmation is delayed by design because later price action is required. Results may vary between symbols, timeframes, sessions, and data feeds.

The indicator does not identify final market tops or bottoms with certainty. Historical observations do not guarantee future market behavior.

This script is provided for research and educational purposes only. It is not financial or investment advice.

คำจำกัดสิทธิ์ความรับผิดชอบ

ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน