OPEN-SOURCE SCRIPT

Candle Body Support/Resistance [LuxAlgo]

The Candle Body Support/Resistance indicator is a tool that provides Support/Resistance levels from high-volatility candles, a concept originally described by Steve Nison in "Beyond Candlesticks".

Users can define the candle body percentage used to set the detected support/resistance levels. Occurrences of price testing the returned levels are highlighted using user-customizable dots.

🔶 USAGE

快照

Support/Resistance levels are drawn from volatile candles, that is candles having a body (range between opening and closing price) whose magnitude is larger than the Volatility Threshold, which is determined by the multiplicative factor of an ATR (Average True Range) using a user set length.

快照

The level starts from the opening price +/- a percentage of the open-close range. Users can adjust the percentage of the candle body used as support/resistance levels respectively, with higher percentage values returning levels prone to get reached sooner by the price.

快照

A test is considered valid when a wick passes through the Support/Resistance level while the closing price is not breaking it.

Two modes are included, Trailing and Historical, both affecting the displayed elements of the indicator, these are described in the sub-section below.

🔹 Historical

The Historical Mode will draw a separate line from every Volatile Candle. When this line is tested, a dot will be drawn.

快照

In the above example, the red resistance line was tested once until a bullish volatile candle formed, which closed just below the resistance level. The resistance level was tested again, after which the newly created support level was broken quickly, and the price decreased. These levels proved helpful later, acting as resistance/support levels (illustrated by the extra manually drawn dashed white lines).

快照

To prevent cluttering Support/Resistance, lines will be deleted when the line is mitigated and hasn't been tested.

When a Support/Resistance line reaches its Maximum Line Length, it will also be deleted when it has not been tested.

🔹 Trailing

When a new volatile candle of the same type (bullish/bearish) appears while the Support/Resistance isn't broken, this line will be updated with the values of the new volatile candle. This creates a trailing line and a less cluttered chart.

Unlike the Historical mode, a line will not be deleted after a while or when it is mitigated. Instead, the line won't be updated anymore. A new line will start from the next found volatile candle.

快照

Using the same situation as the Historical Mode example, we can note the future significance of old support/resistance levels (illustrated by the extra manually drawn dashed white lines).

The user can switch between these 2 modes, each offering a unique perspective on the market. This provides a more in-depth examination of the market, enhancing the user's trading analysis.

快照

Using a copy of our indicator while using both modes can also be helpful.

快照

🔶 DETAILS

The Support level is the opening price of a bullish volatile candle plus a user-set percentage of the candle's body, while the Resistance level is the opening price of a bearish volatile candle minus a percentage of the candle's body.

快照

The following example illustrates the ATR with the multiplicative factor (Volatility Threshold) where the body of Volatile candles exceeds the ATR limits. Changing the Volatility Threshold and ATR length gives users extra flexibility to adjust to their needs.

快照

🔹 Max Line Length

快照

When using the Historical Mode and the duration of a displayed level reaches the user-set Max Line Length value, the level will return to the last test or be deleted when it has not been tested.

🔶 SETTINGS

  • Display Mode: Display mode of the indicator.
  • Support %: Sets the distance of the Support Line from the opening price relative to the candle body.
  • Resistance %: Sets the distance of the Resistance Line from the opening price relative to the candle body.


🔹 Filter

  • Length ATR: Amount of bars for the calculation of the Average True Range.
  • Volatility Threshold: multiplicative factor of ATR.
  • Max Line Length: Maximum allowed duration/length (in bars) of a Support/Resistance level.
candleCandlestick analysisluxalgosignalssupportSupport and Resistancesupportandresitance

开源脚本

本着真正的TradingView精神,此脚本的作者已将其开源,以便交易者可以理解和验证它。向作者致敬!您可以免费使用它,但在出版物中重复使用此代码受网站规则约束。 您可以收藏它以在图表上使用。

想在图表上使用此脚本?


Get access to our exclusive tools: luxalgo.com

Join our 150k+ community: discord.gg/lux

All content provided by LuxAlgo is for informational & educational purposes only. Past performance does not guarantee future results.
更多:

免责声明