jdhadwin

Swing Filter

Swing Filter allows you to identify market swings and use the settings to filter out the noise.

The concept is the same as Pine Script's built in pivothigh() and pivotlow(), except with a command center full of controls. Do you to only see swings that are a certain amount higher or lower than their neighboring candles? Want to filter out flash-crashes or freak-spikes? Do you want to count swing-highs or lows that are formed by multiple bars? ...how many? ...how strict? Do you only want swings that are already confirmed or do you want swings that are probably about to be confirmed? You get the idea.

Swing Filter was designed to be plugged into other tools. Swings are used to figure Support and Resistance in Technical Analysis (TA), so you'll find that it is swing filter working in the background of my Support & Resistance Indicator. The creator of this indicator would be happy to help you implement Swing Filter into your workflow, and even can unlock rewiring features that allow Trading View Premium customers to use outputs from other indicators as inputs to swing filter (indicator layering).

INDICATOR SETTINGS:
  • SWING HIGH VISIBILITY - Show the location of all filtered swing-highs, marked with green "H"
  • Show Unconfirmed Swing Highs - Whereas a confirmed swing high is shown with a green H, unconfirmed swing highs are shown with an orange H. Sometimes you want to see what could become a swing high before the final right-neighboring candle closes and confirms it. As long as the final right-side candle still has a lower high, we can show an unconfirmed swing high. Once the final right-side candle closes with a lower high, then we have a confirmed swing high. When the "# of Lower Bars to Right of Swing High" setting is set to a number greater than 1, keep in mind that unconfirmed candles will only ever appear one candle prior to confirmation.
  • # of Lower Bars to Left of Swing High - Swing highs are calculated based on being higher than neighboring candles. How many candles do you want to check to the left-side of a swing high?
  • # of Lower Bars to Right of Swing High - Swing highs are calculated based on being higher than neighboring candles. How many candles do you want to check to the right-side of a swing high?
  • Must be This % Higher Than Left Bars - Filter out highs that aren't high enough. "0.5" would require your swing highs to be at least half a percent higher than the high of its confirming left-side bars.
  • Must be This % Higher Than Right Bars - Filter out highs that aren't high enough. "1" would require your swing highs to be at least one percent higher than the high of its confirming right-side bars.
  • Multibar Highs - # Bars Allowed to Form High - Filter out or allow highs that are formed at a transition from one bar to another. Especially on low spread exchanges like GDAX, highs may be formed by many consecutive bars, formed by persistant impenetrable buy/sell walls. When using multibar highs, they are counted as a single candle: the swing high will be marked on the right-most high of the multi-bar high, and then the left-side bars are counted from the left-most high of the multi-bar high.
  • Multibar Highs Strict-Mode - Some multibar highs are just the result of chance, meaning that the first candle reached it's high, went back down, then the second candle reached the same high at a later time. Strict mode will filter these out and only show multibar swing highs that were formed when a candle closed at its high and the next candle opened at its same high. How strict? It allows a one penny difference (for negligible spreads). It also doesn't care about the candles' lows, which leaves room for a future super-strict mode.

    *For the complete list of settings and instructions see comments below (sorry they're listed in backwards order below, and the publishing rules won't let me put them all here (too long))
보호된 스크립트입니다
이 스크립트는 클로즈 소스로 게시되며 자유롭게 사용할 수 있습니다. 당신은 스크립트를 차트에 사용하기 위해 그것을 즐겨찾기 할 수 있습니다. 소스 코드는 보거나 수정할 수 없습니다.
면책사항

이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.

차트에 이 스크립트를 사용하시겠습니까?