east-west_trading

Pivots and Swings

east-west_trading Güncellendi   
This indicator displays simple pivots of varying degrees and connects them into swings whilst displaying the information of each swing.
First order pivot highs are confirmed when the N number of bars each side of the bar in question have a lower high whilst a first order pivot low is confirmed when the N number of bars on each side of the bar in question have a higher low. In this script N is set to 2 as a default, so when the middle bar of a set of 5 bars has the highest high, then it is considered a first order pivot high and vice versa for lows.

Second order pivot highs are confirmed when a first order pivot is higher than the first order pivot points on either side of the pivot point in question. Second order pivot lows are confirmed when a first order pivot low is lower than the first order pivot lows either side of the pivot in question.

Third order pivots follow the same logic but consider the highest and lowest second order pivots



A quick note on how the bars are coloured basis trends. If price breaks through the last first order pivot high, the bars will be coloured in a (default) green sequence and will stay green until price moves back below the most recent first order pivot low, at which time it will revert to a (default) red sequence.

The information about the duration and magnitude of the swings are displayed in an effort to identify when a swing leg of an overall trend may be shortening which signifies a weakening trend, or lengthening to signify a trend that is gaining in strength.

I hope you find this indicator useful!
Sürüm Notları:
Simple code tidy up where I have removed some redundant checks that should have been removed originally

Açık kaynak kodlu komut dosyası

Gerçek TradingView ruhuyla, bu betiğin yazarı, yatırımcının anlayabilmesi ve doğrulayabilmesi için onu açık kaynak olarak yayınladı. Yazarın eline sağlık! Bunu ücretsiz olarak kullanabilirsiniz, ancak bu kodun bir yayında yeniden kullanımı Kullanım Koşulları ile yönetilir. Bir grafikte kullanmak için favorilere ekleyebilirsiniz.

Feragatname

Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.

Bu komut dosyasını bir grafikte kullanmak ister misiniz?