PROTECTED SOURCE SCRIPT
MTF Price Break Alerts

📌 MTF Price Break Alerts
This Pine Script is designed to alert you when a bar closes above or below a chosen price level, based on the close of a specific timeframe (MTF) that you set.
🔑 Features in Detail
1. Custom Price Level
You can set any priceLevel you want (e.g., 2000.0).
The script continuously monitors that level against the chosen timeframe’s close.
2. Single Timeframe Monitoring
You choose one timeframe (tf) using the input box (e.g., "15", "60", "240", "D"), ensures signals are only confirmed after that bar has closed (no repainting).
3. Crossover Detection
Triggers when the MTF close crosses from below to above or from above to below your price level. You only get alerts once per cross (not every bar staying above/below).
4. Dynamic Alerts
✅ This generates dynamic messages showing both the timeframe label and the price level.
Example messages:
Bar on M15 closes ABOVE 2000.0
Bar on H1 closes BELOW 2000.0
👉 To use:
When setting up an alert in TradingView, pick “Any alert() function call”.
Timeframe Labels (Friendly Format)
Raw inputs like "15", "60", "240", "D", "W" are auto-formatted to trading-friendly labels:
"15" → M15
"60" → H1
"240" → H4
"D" → D1
"W" → W1
Keeps alerts easy to read.
Optional Background Highlight
A visual cue on the chart (green or red shading) when conditions are met.
Controlled with the toggle showBg.
Doesn’t clutter the chart with lines/plots.
⚡ Example Use Case
Let’s say:
You want to watch H1 closes above/below 2000.
You set priceLevel = 2000.0 and tf = "60".
On every H1 close, the script checks:
If the H1 close moves from below → above 2000 → alert:
Bar on H1 closes ABOVE 2000.0
If the H1 close moves from above → below 2000 → alert:
Bar on H1 closes BELOW 2000.0
This is very useful for S/R level monitoring, breakout alerts, and key price action watching across higher timeframes, even while sitting on a lower timeframe chart.
🛠 Limitations
Monitors only one timeframe per script instance (but you can load multiple copies on the chart for multiple TFs or price levels).
Alerts are triggered only once per crossover (not for every bar staying above/below).
Alert message precision uses raw price (e.g., 2000 or 2000.12345).
This Pine Script is designed to alert you when a bar closes above or below a chosen price level, based on the close of a specific timeframe (MTF) that you set.
🔑 Features in Detail
1. Custom Price Level
You can set any priceLevel you want (e.g., 2000.0).
The script continuously monitors that level against the chosen timeframe’s close.
2. Single Timeframe Monitoring
You choose one timeframe (tf) using the input box (e.g., "15", "60", "240", "D"), ensures signals are only confirmed after that bar has closed (no repainting).
3. Crossover Detection
Triggers when the MTF close crosses from below to above or from above to below your price level. You only get alerts once per cross (not every bar staying above/below).
4. Dynamic Alerts
✅ This generates dynamic messages showing both the timeframe label and the price level.
Example messages:
Bar on M15 closes ABOVE 2000.0
Bar on H1 closes BELOW 2000.0
👉 To use:
When setting up an alert in TradingView, pick “Any alert() function call”.
Timeframe Labels (Friendly Format)
Raw inputs like "15", "60", "240", "D", "W" are auto-formatted to trading-friendly labels:
"15" → M15
"60" → H1
"240" → H4
"D" → D1
"W" → W1
Keeps alerts easy to read.
Optional Background Highlight
A visual cue on the chart (green or red shading) when conditions are met.
Controlled with the toggle showBg.
Doesn’t clutter the chart with lines/plots.
⚡ Example Use Case
Let’s say:
You want to watch H1 closes above/below 2000.
You set priceLevel = 2000.0 and tf = "60".
On every H1 close, the script checks:
If the H1 close moves from below → above 2000 → alert:
Bar on H1 closes ABOVE 2000.0
If the H1 close moves from above → below 2000 → alert:
Bar on H1 closes BELOW 2000.0
This is very useful for S/R level monitoring, breakout alerts, and key price action watching across higher timeframes, even while sitting on a lower timeframe chart.
🛠 Limitations
Monitors only one timeframe per script instance (but you can load multiple copies on the chart for multiple TFs or price levels).
Alerts are triggered only once per crossover (not for every bar staying above/below).
Alert message precision uses raw price (e.g., 2000 or 2000.12345).
보호된 스크립트입니다
이 스크립트는 비공개 소스로 게시됩니다. 하지만 제한 없이 자유롭게 사용할 수 있습니다 — 여기에서 자세히 알아보기.
면책사항
이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.
보호된 스크립트입니다
이 스크립트는 비공개 소스로 게시됩니다. 하지만 제한 없이 자유롭게 사용할 수 있습니다 — 여기에서 자세히 알아보기.
면책사항
이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.