OPEN-SOURCE SCRIPT
CRT (Candle Range Theory)+ Daily Bias - Milana Trades

Overview
This indicator combines Candle Range Theory (CRT) with a Daily & Weekly Bias model, providing traders with both short-term CRT candle detection and higher-timeframe directional context. It is designed to help traders identify liquidity traps, potential reversals, and overall market bias in a structured and visual way.
🔹 1. Candle Range Theory (CRT)
The CRT module focuses on detecting CRT candles (false breakouts) and marking key high/low ranges.
Bullish CRT :

Occurs when the price makes a lower low compared to the previous candle but closes bullish (close > open).
→ Signals potential upside reversal.
Bearish CRT :

Occurs when the price makes a higher high compared to the previous candle but closes bearish (close < open).
→ Signals potential downside reversal.
When a CRT is detected:
The indicator plots dotted lines and levels from the trap candle’s high/low.
Labels (CRT, CRT H, CRT L) are drawn for easy visualization.
Previous CRT levels/labels can be cleared automatically if desired.
Alerts are triggered once a trap is confirmed (on candle close).
🔹 2. Daily & Weekly Bias
The bias model provides directional context based on daily and weekly candle close
Bias is determined by analyzing:
Breaks of previous highs/lows.
Failed breaks (false moves beyond prior levels).
Inside bars (neutral conditions).
Possible Bias States:
The logic Daily BIAS
Close Above PDH → BULLISH
Close Below PDL → BEARISH
Failed Close Above → BEARISH
Failed Close Below → BULLISH
Inside Range → NEUTRAL
Both Daily and Weekly bias are calculated and displayed in a structured table.
⚠️ Important Note on Daily Bias
The Daily Bias provided by this indicator should be treated as a technical reference, not an absolute signal. Market structure is complex, and automatic bias detection may not always capture context such as news events, liquidity zones, or higher-timeframe confluence.
👉 Always prioritize your own market analysis and discretion over the indicator’s bias. Use the Daily/Weekly bias as a guideline to support your view, rather than as a rule to follow blindly.
🔹 3. Bias Table
A clean on-chart table (top-right corner by default) displays:
Timeframe (Daily / Weekly).
Current bias (Bullish, Bearish, Neutral).
The table is fully customizable:
Colors (header, text, row backgrounds).
Option to show/hide Daily or Weekly bias.
🔹 4. Alerts
The indicator supports real-time alerts:
Bearish CRT detected
Bullish CRT detected
These alerts trigger only on confirmed candle closes, ensuring reliable signals.
🔹 5. Settings
CRT Module
Length → How many bars CRT levels extend.
Clear Broken → Automatically clear past CRT lines when a new trap is detected.
Trap Candle Colors → Define bullish/bearish trap highlight colors.
CRT Line/Label Styling → Customize line style, width, label size, and text/background colors.
Bias Module
Show Table → Enable/disable bias table.
Show Daily / Show Weekly Bias → Toggle specific timeframes.
Colors → Set bullish, bearish, and neutral bias colors.
Table Styling → Customize background, border, header, and row colors.
🔹 6. How to Use
Look for trap candle signals (CRT labels) near important liquidity levels.
Use the Daily & Weekly bias table to confirm whether the broader trend supports the trap signal.
Align CRT signals with bias direction for higher-probability setups.
Use alerts to stay notified of trap events without monitoring the chart constantly.
See the levels. Feel the flow
This indicator combines Candle Range Theory (CRT) with a Daily & Weekly Bias model, providing traders with both short-term CRT candle detection and higher-timeframe directional context. It is designed to help traders identify liquidity traps, potential reversals, and overall market bias in a structured and visual way.
🔹 1. Candle Range Theory (CRT)
The CRT module focuses on detecting CRT candles (false breakouts) and marking key high/low ranges.
Bullish CRT :
Occurs when the price makes a lower low compared to the previous candle but closes bullish (close > open).
→ Signals potential upside reversal.
Bearish CRT :
Occurs when the price makes a higher high compared to the previous candle but closes bearish (close < open).
→ Signals potential downside reversal.
When a CRT is detected:
The indicator plots dotted lines and levels from the trap candle’s high/low.
Labels (CRT, CRT H, CRT L) are drawn for easy visualization.
Previous CRT levels/labels can be cleared automatically if desired.
Alerts are triggered once a trap is confirmed (on candle close).
🔹 2. Daily & Weekly Bias
The bias model provides directional context based on daily and weekly candle close
Bias is determined by analyzing:
Breaks of previous highs/lows.
Failed breaks (false moves beyond prior levels).
Inside bars (neutral conditions).
Possible Bias States:
The logic Daily BIAS
Close Above PDH → BULLISH
Close Below PDL → BEARISH
Failed Close Above → BEARISH
Failed Close Below → BULLISH
Inside Range → NEUTRAL
Both Daily and Weekly bias are calculated and displayed in a structured table.
⚠️ Important Note on Daily Bias
The Daily Bias provided by this indicator should be treated as a technical reference, not an absolute signal. Market structure is complex, and automatic bias detection may not always capture context such as news events, liquidity zones, or higher-timeframe confluence.
👉 Always prioritize your own market analysis and discretion over the indicator’s bias. Use the Daily/Weekly bias as a guideline to support your view, rather than as a rule to follow blindly.
🔹 3. Bias Table
A clean on-chart table (top-right corner by default) displays:
Timeframe (Daily / Weekly).
Current bias (Bullish, Bearish, Neutral).
The table is fully customizable:
Colors (header, text, row backgrounds).
Option to show/hide Daily or Weekly bias.
🔹 4. Alerts
The indicator supports real-time alerts:
Bearish CRT detected
Bullish CRT detected
These alerts trigger only on confirmed candle closes, ensuring reliable signals.
🔹 5. Settings
CRT Module
Length → How many bars CRT levels extend.
Clear Broken → Automatically clear past CRT lines when a new trap is detected.
Trap Candle Colors → Define bullish/bearish trap highlight colors.
CRT Line/Label Styling → Customize line style, width, label size, and text/background colors.
Bias Module
Show Table → Enable/disable bias table.
Show Daily / Show Weekly Bias → Toggle specific timeframes.
Colors → Set bullish, bearish, and neutral bias colors.
Table Styling → Customize background, border, header, and row colors.
🔹 6. How to Use
Look for trap candle signals (CRT labels) near important liquidity levels.
Use the Daily & Weekly bias table to confirm whether the broader trend supports the trap signal.
Align CRT signals with bias direction for higher-probability setups.
Use alerts to stay notified of trap events without monitoring the chart constantly.
See the levels. Feel the flow
开源脚本
本着TradingView的真正精神,此脚本的创建者将其开源,以便交易者可以查看和验证其功能。向作者致敬!虽然您可以免费使用它,但请记住,重新发布代码必须遵守我们的网站规则。
免责声明
这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。
开源脚本
本着TradingView的真正精神,此脚本的创建者将其开源,以便交易者可以查看和验证其功能。向作者致敬!虽然您可以免费使用它,但请记住,重新发布代码必须遵守我们的网站规则。
免责声明
这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。