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.
และใน:

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