PROTECTED SOURCE SCRIPT
Telah dikemas kini

AstroTrading_DragonStart

59
Overview
The “AstroTrading_DragonStart” indicator is designed to help traders identify specific candlestick patterns that may signal changes in market momentum. It does this by:

Detecting Doji Candles and Drawing Horizontal Lines:
When a doji is identified (i.e. when the candle’s body is very small relative to its overall range), the script draws a horizontal line from the midpoint of the doji’s body, extending a specified number of bars to the right. This may serve as a reference level for potential support/resistance.

Identifying “Bobin” Patterns (Reversal Zigzag):
The indicator looks for a four-candle zigzag pattern (in both bullish and bearish directions) by comparing successive closes. It then measures the relative sizes of the candle bodies over these four bars. If the ratio of the largest to the smallest body is below a user-defined “Bobin Sensibility” threshold, it draws a box (the “bobin box”) around the area defined by the highest close and the lowest open of these candles. This box is intended to highlight a region where price may “wind up” or reverse.

Detailed Components
1. Doji Detection and Horizontal Line Drawing
Doji Identification:
The function drawHorizontalLineFromDoji computes the absolute difference between the open and close of the current candle. A candle is considered a doji if its body size is less than 10% of its entire range (high - low).

Line Drawing:
Once a doji is detected, the script saves its bar index and calculates the midpoint of its body. It then uses line.new to draw a horizontal line starting from this midpoint and extending to the right for a user-defined number of bars (the “Line Length”).

pinescript
Kopyala
drawHorizontalLineFromDoji(LineLong, lineColor, lineWidth) =>
dojiSize = math.abs(open - close)
isDoji = dojiSize < (high - low) * 0.1
var int lastDojiIndex = na
var float lastDojiBodyMid = na
if isDoji
lastDojiIndex := bar_index
lastDojiBodyMid := (open + close) / 2
line.new(x1=lastDojiIndex, y1=lastDojiBodyMid, x2=lastDojiIndex + LineLong, y2=lastDojiBodyMid, width=lineWidth, color=lineColor)
User Customization:
Inputs allow users to adjust the line’s length, color, and width, as well as how many historical bars to display.

2. Drawing a Rectangle Based on a Condition
Price Range Calculation:
The script calculates the lowest low and the highest high over the last 5 candles. It then defines a condition using the relationship between current and past highs and lows. Although the rectangle’s boundaries (left, right, top, and bottom) are computed when the condition is met, this part is intended to highlight an area where price structure shows specific characteristics (possibly a consolidation or reversal zone).
3. Bobin Pattern Detection
Pattern Conditions (bobin4a and bobin4b):
The indicator defines two conditions to detect a four-candle zigzag pattern:
bobin4a: A sequence where the closes alternate with the pattern: down, up, down, up.
bobin4b: The inverse pattern: up, down, up, down.
Body Size Analysis:
For the last four candles (the current candle and the previous three), the script computes the absolute difference between the close and the open. It then calculates:
The maximum body size (buyuk4)
The minimum body size (kucuk4)
A ratio (oran4) defined as the maximum divided by the minimum.
Defining the Bobin Box:
The script also finds:
kapanis4ENB: The highest close among the four candles.
acilis4ENK: The lowest open among the four candles.
If either bobin4a or bobin4b is true and the ratio (oran4) is less than or equal to the user-defined “Bobin Sensibility” threshold, a box is drawn. This box spans from 4 bars before the current bar (i.e. covering the four-candle pattern) to a width defined by “Bobin Box Width”. The box’s top is set at the highest close, and its bottom at the lowest open.
pinescript
Kopyala
if (bobin4a or bobin4b) and oran4 <= i
bobinkutu := box.new(left=bar_index - 4, top=kapanis4ENB, right=bar_index + BW, border_color=color.red, bottom=acilis4ENK, border_width=1, bgcolor=color.new(color.red, 80))
Interpretation:
The drawn bobin box helps traders visually identify a region where price has shown a low variation (as measured by the ratio), potentially indicating a pause in momentum or an impending reversal.
Summary
The “AstroTrading_DragonStart” indicator is a composite tool that combines doji detection and a bobin (zigzag) pattern recognition technique. Its main features include:

Doji-Based Horizontal Lines:
When a doji candle is detected (defined by a very small body relative to its range), a horizontal line is drawn from the candle’s midpoint. This can be used to mark potential pivot levels.

Bobin Pattern and Box:
The indicator searches for specific four-candle reversal patterns (either a down–up–down–up sequence or vice versa) and compares the body sizes of these candles. When the variation (ratio) is below a chosen sensitivity threshold, it draws a red box covering the range between the highest close and lowest open of these candles. This box visually highlights an area where price may experience a significant reaction.

Customization:
Users can adjust inputs such as the line length, colors, box width, and sensitivity parameters to suit different markets or timeframes.

This detailed explanation follows TradingView’s script publication rules by clearly describing each component’s purpose and logic without extraneous language. The indicator is designed for traders who use candlestick patterns as part of their technical analysis, and it provides both visual cues and structured data to support decision-making.

This explanation should help users understand how the “AstroTrading_DragonStart” indicator works and how its various components can be applied to identify potential reversal or consolidation zones in the market.
Nota Keluaran
Overview
The “AstroTrading_DragonStart” indicator is designed to help traders identify specific candlestick patterns that may signal changes in market momentum. It does this by:

Detecting Doji Candles and Drawing Horizontal Lines:
When a doji is identified (i.e. when the candle’s body is very small relative to its overall range), the script draws a horizontal line from the midpoint of the doji’s body, extending a specified number of bars to the right. This may serve as a reference level for potential support/resistance.

Identifying “Bobin” Patterns (Reversal Zigzag):
The indicator looks for a four-candle zigzag pattern (in both bullish and bearish directions) by comparing successive closes. It then measures the relative sizes of the candle bodies over these four bars. If the ratio of the largest to the smallest body is below a user-defined “Bobin Sensibility” threshold, it draws a box (the “bobin box”) around the area defined by the highest close and the lowest open of these candles. This box is intended to highlight a region where price may “wind up” or reverse.

Detailed Components
1. Doji Detection and Horizontal Line Drawing
Doji Identification:
The function drawHorizontalLineFromDoji computes the absolute difference between the open and close of the current candle. A candle is considered a doji if its body size is less than 10% of its entire range (high - low).

Line Drawing:
Once a doji is detected, the script saves its bar index and calculates the midpoint of its body. It then uses line.new to draw a horizontal line starting from this midpoint and extending to the right for a user-defined number of bars (the “Line Length”).

pinescript
Kopyala
drawHorizontalLineFromDoji(LineLong, lineColor, lineWidth) =>
dojiSize = math.abs(open - close)
isDoji = dojiSize < (high - low) * 0.1
var int lastDojiIndex = na
var float lastDojiBodyMid = na
if isDoji
lastDojiIndex := bar_index
lastDojiBodyMid := (open + close) / 2
line.new(x1=lastDojiIndex, y1=lastDojiBodyMid, x2=lastDojiIndex + LineLong, y2=lastDojiBodyMid, width=lineWidth, color=lineColor)
User Customization:
Inputs allow users to adjust the line’s length, color, and width, as well as how many historical bars to display.

2. Drawing a Rectangle Based on a Condition
Price Range Calculation:
The script calculates the lowest low and the highest high over the last 5 candles. It then defines a condition using the relationship between current and past highs and lows. Although the rectangle’s boundaries (left, right, top, and bottom) are computed when the condition is met, this part is intended to highlight an area where price structure shows specific characteristics (possibly a consolidation or reversal zone).
3. Bobin Pattern Detection
Pattern Conditions (bobin4a and bobin4b):
The indicator defines two conditions to detect a four-candle zigzag pattern:
bobin4a: A sequence where the closes alternate with the pattern: down, up, down, up.
bobin4b: The inverse pattern: up, down, up, down.
Body Size Analysis:
For the last four candles (the current candle and the previous three), the script computes the absolute difference between the close and the open. It then calculates:
The maximum body size (buyuk4)
The minimum body size (kucuk4)
A ratio (oran4) defined as the maximum divided by the minimum.
Defining the Bobin Box:
The script also finds:
kapanis4ENB: The highest close among the four candles.
acilis4ENK: The lowest open among the four candles.
If either bobin4a or bobin4b is true and the ratio (oran4) is less than or equal to the user-defined “Bobin Sensibility” threshold, a box is drawn. This box spans from 4 bars before the current bar (i.e. covering the four-candle pattern) to a width defined by “Bobin Box Width”. The box’s top is set at the highest close, and its bottom at the lowest open.
pinescript
Kopyala
if (bobin4a or bobin4b) and oran4 <= i
bobinkutu := box.new(left=bar_index - 4, top=kapanis4ENB, right=bar_index + BW, border_color=color.red, bottom=acilis4ENK, border_width=1, bgcolor=color.new(color.red, 80))
Interpretation:
The drawn bobin box helps traders visually identify a region where price has shown a low variation (as measured by the ratio), potentially indicating a pause in momentum or an impending reversal.
Summary
The “AstroTrading_DragonStart” indicator is a composite tool that combines doji detection and a bobin (zigzag) pattern recognition technique. Its main features include:

Doji-Based Horizontal Lines:
When a doji candle is detected (defined by a very small body relative to its range), a horizontal line is drawn from the candle’s midpoint. This can be used to mark potential pivot levels.

Bobin Pattern and Box:
The indicator searches for specific four-candle reversal patterns (either a down–up–down–up sequence or vice versa) and compares the body sizes of these candles. When the variation (ratio) is below a chosen sensitivity threshold, it draws a red box covering the range between the highest close and lowest open of these candles. This box visually highlights an area where price may experience a significant reaction.

Customization:
Users can adjust inputs such as the line length, colors, box width, and sensitivity parameters to suit different markets or timeframes.

This detailed explanation follows TradingView’s script publication rules by clearly describing each component’s purpose and logic without extraneous language. The indicator is designed for traders who use candlestick patterns as part of their technical analysis, and it provides both visual cues and structured data to support decision-making.

This explanation should help users understand how the “AstroTrading_DragonStart” indicator works and how its various components can be applied to identify potential reversal or consolidation zones in the market.

Penafian

Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.