OPEN-SOURCE SCRIPT

1-3-1 Strat Combo with 50% Level (12h)

Logic Explanation

1-3-1 Combo Detection:
The script detects the 1-3-1 pattern using the previous 3 candles:
Candle 4: Inside Bar (Type 1).
Candle 3: Outside Bar (Type 3).
Candle 2: Inside Bar (Type 1).

4th Candle Behavior:
If the 4th candle (current bar):
Stays an inside bar (Type 1) → isFourthInsideBar is true.
Becomes a directional bar (Type 2) → isFourthDirectional is true.
If either of these conditions is true, the script stops calculating and waits for the next valid 1-3-1 setup.

50% Level Calculation:
If the conditions are not met (e.g., the 4th candle doesn’t stop the pattern), the script:
Plots a dotted line at the 50% level of the 3rd candle.

Adds a label showing the 50% level.
Stop Calculations:
No line, box, or label is drawn if the 4th candle is a Type 1 (inside bar) or Type 2 (directional bar).

Visual Outputs:
Dotted Box: Marks the 1-3-1 combo setup.
50% Line: Drawn only if the 4th candle does not invalidate the pattern.
Label: Displays the 50% level of the 3rd candle.

How to Use:
Apply this script on the 12-hour chart.

The script will:
Detect valid 1-3-1 patterns.
Stop drawing any calculations if the 4th candle is an inside bar (1) or a directional bar (2).
Wait for the next valid 1-3-1 combo.
Candlestick analysisChart patterns

오픈 소스 스크립트

진정한 TradingView 정신에 따라, 이 스크립트의 저자는 트레이더들이 이해하고 검증할 수 있도록 오픈 소스로 공개했습니다. 저자에게 박수를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 출판물에서 이 코드를 재사용하는 것은 하우스 룰에 의해 관리됩니다. 님은 즐겨찾기로 이 스크립트를 차트에서 쓸 수 있습니다.

차트에 이 스크립트를 사용하시겠습니까?

면책사항