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

syot kilat

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.

syot kilat

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.

syot kilat

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.

syot kilat

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).

syot kilat

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.

syot kilat

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.

syot kilat

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

syot kilat

🔶 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.

syot kilat

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.

syot kilat

🔹 Max Line Length

syot kilat

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

Skrip sumber terbuka

Dalam semangat sebenar TradingView, penulis telah menerbitkan kod Pine ini sebagai sumber terbuka supaya pedagang dapat memahami dan mengesahkannya. Sorakan kepada penulis! Anda boleh menggunakan perpustakaan ini secara percuma, tetapi penggunaan semula kod dalam penerbitan ini adalah dikawal oleh Peraturan dalaman. Anda boleh menyukainya untuk menggunakannya pada carta.

Ingin menggunakan skrip ini pada carta?


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.
Juga pada:

Penafian