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

Skrip open-source

Dengan semangat TradingView yang sesungguhnya, penulis skrip ini telah menerbitkannya sebagai sumber terbuka, sehingga para trader dapat memahami dan memverifikasinya. Hormat untuk penulisnya! Anda dapat menggunakannya secara gratis, namun penggunaan kembali kode ini dalam publikasi diatur oleh Tata Tertib. Anda dapat memfavoritkannya untuk digunakan pada chart

Inggin menggunakan skrip ini pada chart?

Pernyataan Penyangkalan