OPEN-SOURCE SCRIPT
已更新 ka66: Swing/Pivot Point Lines

This indicator draws swing-highs and swing-lows, also called pivot highs and lows.
A swing high is a bar which has a higher-high than its surrounding bars (to the left and the right).
A swing low is a bar which has a lower-low than its surrounding bars (to the left and the right).
A common example of a pivot is Bill Williams' Fractal, which specifies that the centre bar must have a higher high than 2 bars to its left, and 2 bars to its right for a swing high, taking into account 5 bars at a time. Similarly, for a swing low, the centre bar must have a lower low than the 2 bars to its left and right.
This indicator allows configurable adjacent bars as input. Entering 2, means it essentially picks out a Williams Fractal. But you can select 1 (say for higher timeframes), using one 1 bar to the left and right of the centre bar.
The indicator will draw Swing/Pivot High/Low as circles at the same price level as the centre bar, till the next one shows up. Drawing is offset so it starts at the centre bar (the swing bar), showing exactly where the pivot bar is.
There are 2 main uses of pivot points, in various strategies:
Messy pivot structures easily point out ranging markets.
There are a few of these, some closed source, which I don't like, since I think people should generally know what they are trading with, and I want to make sure I understand the logic exactly.
A swing high is a bar which has a higher-high than its surrounding bars (to the left and the right).
A swing low is a bar which has a lower-low than its surrounding bars (to the left and the right).
A common example of a pivot is Bill Williams' Fractal, which specifies that the centre bar must have a higher high than 2 bars to its left, and 2 bars to its right for a swing high, taking into account 5 bars at a time. Similarly, for a swing low, the centre bar must have a lower low than the 2 bars to its left and right.
This indicator allows configurable adjacent bars as input. Entering 2, means it essentially picks out a Williams Fractal. But you can select 1 (say for higher timeframes), using one 1 bar to the left and right of the centre bar.
The indicator will draw Swing/Pivot High/Low as circles at the same price level as the centre bar, till the next one shows up. Drawing is offset so it starts at the centre bar (the swing bar), showing exactly where the pivot bar is.
There are 2 main uses of pivot points, in various strategies:
- Market Structure: to objectively define higher-highs/lows and lower-highs/lows in Trend Analysis.
- More generally, to then determine if a trend might reverse, or continue as pivot levels are broken.
Messy pivot structures easily point out ranging markets.
There are a few of these, some closed source, which I don't like, since I think people should generally know what they are trading with, and I want to make sure I understand the logic exactly.
發行說明
Label relative swing points as per Dow Theory, useful user request:- Higher Highs (HH)
- Higher Lows (HL)
- Lower Highs (LH)
- Lower Lows (LL)
開源腳本
本著TradingView的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。
開源腳本
本著TradingView的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。