Custom Cancel Size Pattern

This TradingView indicator identifies a specific 3-candle pattern based on candle size (measured using True Range) and highlights the third candle (or later) when the pattern is complete.
---
The 3-Candle Pattern Logic:
1. Candle 1 (two candles ago)
Its True Range (TR) must be greater than the current Average True Range (ATR).
This means it's a relatively large candle — we're looking for strong movement here.
2. Candle 2 (one candle ago)
Its TR must be less than the ATR.
This suggests a "cooling off" or a smaller move.
3. Candle 3 (the current candle)
Its TR must be at least 2 times bigger than Candle 2's TR.
This means a breakout or strong move again, following the smaller candle.
---
What the Indicator Does:
Detects this 3-candle pattern as new candles form.
Highlights the third candle (the current one) with a green color and a label beneath it that says "Pattern".
Optionally colors the bar green (you can customize this if you want a different visual style).
---
What You’ll See on the Chart:
When the conditions are met:
A green bar (if bar coloring is enabled).
A label below the bar that says “Pattern” appears under the third candle.
Skrip sumber terbuka
Dalam semangat sebenar TradingView, pencipta skrip ini telah menjadikannya sumber terbuka supaya pedagang dapat menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupun anda boleh menggunakannya secara percuma, ingat bahawa menerbitkan semula kod ini adalah tertakluk kepada Peraturan Dalaman kami.
Untuk akses pantas pada carta, tambah skrip ini kepada kegemaran anda — ketahui lebih lanjut di sini.
Penafian
Skrip sumber terbuka
Dalam semangat sebenar TradingView, pencipta skrip ini telah menjadikannya sumber terbuka supaya pedagang dapat menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupun anda boleh menggunakannya secara percuma, ingat bahawa menerbitkan semula kod ini adalah tertakluk kepada Peraturan Dalaman kami.
Untuk akses pantas pada carta, tambah skrip ini kepada kegemaran anda — ketahui lebih lanjut di sini.