Wybór Redakcji
OPEN-SOURCE SCRIPT

D-Shape Breakout Signals [LuxAlgo]

The D-Shape Breakout Signals indicator uses a unique and novel technique to provide support/resistance curves, a trailing stop loss line, and visual breakout signals from semi-circular shapes.

🔶 USAGE

snapshot

D-shape is a new concept where the distance between two Swing points is used to create a semi-circle/arc, where the width is expressed as a user-defined percentage of the radius. The resulting arc can be used as a potential support/resistance as well as a source of breakouts.

snapshot

Users can adjust this percentage (width of the D-shape) in the settings ("D-Width"), which will influence breakouts and the Stop-Loss line.

snapshot

🔹 Breakouts of D-Shape

The arc of this D-shape is used for detecting breakout signals between the price and the curve. Only one breakout per D-shape can occur.

snapshot

A breakout is highlighted with a colored dot, signifying its location, with a green dot being used when the top part of the arc is exceeded, and red when the bottom part of the arc is surpassed.

snapshot

When the price reaches the right side of the arc without breaking the arc top/bottom, a blue-colored dot is highlighted, signaling a "Neutral Breakout".

🔹 Trailing Stop-Loss Line

The script includes a Trailing Stop-Loss line (TSL), which is only updated when a breakout of the D-Shape occurs. The TSL will return the midline of the D-Shape subject to a breakout.

snapshot

The TSL can be used as a stop-loss or entry-level but can also act as a potential support/resistance level or trend visualization.

🔶 DETAILS

snapshot

A D-shape will initially be colored green when a Swing Low is followed by a Swing High, and red when a Swing Low is followed by a Swing High.

snapshot

A breakout of the upper side of the D-shape will always update the color to green or to red when the breakout occurs in the lower part. A Neutral Breakout will result in a blue-colored D-shape. The transparency is lowered in the event of a breakout.

In the event of a D-shape breakout, the shape will be removed when the total number of visible D-Shapes exceeds the user set "Minimum Patterns" setting. Any D-shape whose boundaries have not been exceeded (and therefore still active) will remain visible.

🔹 Trailing Stop-Loss Line

snapshot

Only when a breakout occurs will the midline of the D-shape closest to the closing price potentially become the new Trailing Stop value.

The script will only consider middle lines below the closing price on an upward breakout or middle lines above the closing price when it concerns a downward breakout.

In an uptrend, with an already available green TSL, the potential new Stop-Loss value must be higher than the previous TSL value; while in a downtrend, the new TSL value must be lower.

The Stop-Loss line won't be updated when a "Neutral Breakout" occurs.

🔶 SETTINGS

  • Swing Length: Period used for the swing detection, with higher values returning longer-term Swing Levels.


🔹 D-Patterns

  • Minimum Patterns: Minimum amount of visible D-Shape patterns.
  • D-Width: Width of the D-Shape as a percentage of the distance between both Swing Points.
  • Included Swings: Include "Swing High" (followed by a Swing Low), "Swing Low" (followed by a Swing High), or "Both"
  • Style Historical Patterns: Show the "Arc", "Midline" or "Both" of historical patterns.


🔹 Style

  • Label Size/Colors
  • Connecting Swing Level: Shows a line connecting the first Swing Point.
  • Color Fill: colorfill of Trailing Stop-Loss
Bands and ChannelsbreakoutChart patternscircleCyclesluxalgopatternreversalsshapesignals

Skrypt open-source

W prawdziwym duchu TradingView autor tego skryptu opublikował go jako open source, aby inwestorzy mogli go zrozumieć i zweryfikować. Pozdrowienia dla autora! Możesz go używać bezpłatnie, ale ponowne użycie tego kodu w publikacji podlega Zasadom Regulaminu. Możesz go oznaczyć jako ulubione, aby użyć go na wykresie.

Chcesz użyć tego skryptu na wykresie?


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.
Również na:

Wyłączenie odpowiedzialności