OPEN-SOURCE SCRIPT

Ultimate Zones

ที่อัปเดต:
The story is simple: I didn't find a support/resistance zones indicator that I actually liked, so I made my own.

Features:
  • Independent of the chart timeframe (zones don't change if you switch timeframes) - very important for practical use
  • Live mode (repainting) plus historic mode (non-repainting)
  • Selectable timeframe for zone calculation (default: daily)
  • Can adjust how far the indicator looks back into the past (default: 500 days)
  • Can adjust pivot period to find more or fewer zones
  • Zone heights are based on long-term ATR (to adapt to the asset's volatility automatically)
  • Price tolerance multiplier is adjustable
  • Option to merge zones which are close together into one ("fat zones")


I find that together these options (especially those in the "sensitivity" section) allow me to automatically generate almost all the zones I want to see. Occasionally, I do draw some additional zones to get the perfect image I'm looking for on the chart.

Explanation

We detect pivot points on the selected zone timeframe (taking pivot period and lookback limit into account). Then we combine these pivot points into a zone if they are close enough together in price (here the tolerance parameter comes into play). If "fat zones" is selected, we perform these merges more aggressively even if the resulting zone becomes taller than the standard tolerance.

The ATR used for the tolerance is a 500 period ATR, but if there are less than 500 bars available, we use the average of the bars available so far, so we always have a value to work with.

In order for a zone to be displayed, it must have been touched by at least 2 separate pivot points. We do not distinguish between pivot highs and pivot lows because support is known to turn into resistance and vice versa.

In live mode, we draw the currently active zones as boxes.

In historic mode, we plot the active zones at each bar using "plot" and "fill", so there is no repainting or erasing, and you can see which zones were active at any past date. For practical reasons, we draw a maximum of 15 zones around the current price (i.e. 7-8 zones above and 7-8 zones below the price).
เอกสารเผยแพร่
Fixed help texts in the settings
เอกสารเผยแพร่
Added zone touch alerts ("Alerts" section in settings). Option to receive multiple alerts when a zone is touched multiple times from the same direction.
เอกสารเผยแพร่
Reduced the number of alerts if they come in quick succession. Slightly improved the zone display in historic mode.
เอกสารเผยแพร่
Fixed the preview image (hopefully)
เอกสารเผยแพร่
Additional finetuning of the retouch cooldown logic
เอกสารเผยแพร่
Restructured alert parameters. Display type (Live/Historic) is now independent of whether alerts are enabled.

Note that in the preview image, Live mode is selected, so the alerts may not match the zones displayed.
เอกสารเผยแพร่
Fixed bug where zone alerts would not fire when "Show alerts" was unchecked
Pivot points and levels

สคริปต์โอเพนซอร์ซ

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

ต้องการที่จะใช้สคริปต์นี้บนชาร์ตใช่ไหม?


และใน:

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