OPEN-SOURCE SCRIPT
Master Filter - Trend and Smart Money Zones

Overview
Master Filter combines a proprietary trend engine with the smart-money tools traders actually act on - EMA structure, Fair Value Gaps, Order Blocks and market-structure labels - in a single, clean overlay. Instead of stacking five separate indicators, you get one consistent read of where the trend is and where price is likely to react.
Everything is computed on the current chart timeframe and updates live as new bars form.
What's inside
1. The Master Filter © - trend & signals
A triple-smoothed price baseline (TEMA) is tracked against an adaptive average that follows the highs in an uptrend and the lows in a downtrend. An ATR-based channel (length 365 x multiplier, smoothed) acts as a confirmation filter that aims to suppress false flips during chop. When direction confirms, the script prints a LONG / SHORT marker on the bar. You can optionally plot the high / middle / low channel lines.
2. EMA suite + smoothed mirrors
EMA 100 / 200 / 300 / 365 for trend context, with a shaded zone between the 300 and 365 EMAs. Two optional "mirror" EMAs (a smoothed reflection of the 200 and 365) project the opposite side of price to frame mean-reversion zones.
3. Fair Value Gaps (current timeframe)
Three-bar imbalances are drawn as boxes with a dashed mid-line and tagged with the chart timeframe. Live gaps extend to the current bar and are removed automatically once price trades back through them (mitigation). A "max visible" cap keeps only the most recent gaps.
4. Order Blocks (current timeframe)
SMC-style order blocks are detected on structure breaks (price closing through the last swing high/low). The OB candle is selected within a bounded search window, with a volatility filter so an oversized, high-range bar isn't mistaken for the block. Each OB is drawn as a box plus dashed mid-line, kept per direction up to a configurable limit, and dropped on a strict break. A "max pivot age" setting skips stale blocks far from current price during strong trends.
5. Market structure - HH / HL / LH / LL
Swing pivots are labelled as Higher High / Higher Low / Lower High / Lower Low (teal for higher, orange for lower) so structure shifts are visible at a glance.
How to use
Settings
Grouped by section - Main trend (length, multiplier, channel filter, plot channel), Moving Average (EMA lengths, mirrors, smoothing), Fair Value Gaps (show, max visible, colours), Order Blocks (show, max per side, search/structure length, max pivot age, colours), and HH/HL/LH/LL (show, swing length, lookback).
Alerts
Notes
This indicator is a decision-support tool, not a signal-for-hire system. It does not place orders and past behaviour does not guarantee future results. Always combine it with your own risk management.
Master Filter combines a proprietary trend engine with the smart-money tools traders actually act on - EMA structure, Fair Value Gaps, Order Blocks and market-structure labels - in a single, clean overlay. Instead of stacking five separate indicators, you get one consistent read of where the trend is and where price is likely to react.
Everything is computed on the current chart timeframe and updates live as new bars form.
What's inside
1. The Master Filter © - trend & signals
A triple-smoothed price baseline (TEMA) is tracked against an adaptive average that follows the highs in an uptrend and the lows in a downtrend. An ATR-based channel (length 365 x multiplier, smoothed) acts as a confirmation filter that aims to suppress false flips during chop. When direction confirms, the script prints a LONG / SHORT marker on the bar. You can optionally plot the high / middle / low channel lines.
2. EMA suite + smoothed mirrors
EMA 100 / 200 / 300 / 365 for trend context, with a shaded zone between the 300 and 365 EMAs. Two optional "mirror" EMAs (a smoothed reflection of the 200 and 365) project the opposite side of price to frame mean-reversion zones.
3. Fair Value Gaps (current timeframe)
Three-bar imbalances are drawn as boxes with a dashed mid-line and tagged with the chart timeframe. Live gaps extend to the current bar and are removed automatically once price trades back through them (mitigation). A "max visible" cap keeps only the most recent gaps.
4. Order Blocks (current timeframe)
SMC-style order blocks are detected on structure breaks (price closing through the last swing high/low). The OB candle is selected within a bounded search window, with a volatility filter so an oversized, high-range bar isn't mistaken for the block. Each OB is drawn as a box plus dashed mid-line, kept per direction up to a configurable limit, and dropped on a strict break. A "max pivot age" setting skips stale blocks far from current price during strong trends.
5. Market structure - HH / HL / LH / LL
Swing pivots are labelled as Higher High / Higher Low / Lower High / Lower Low (teal for higher, orange for lower) so structure shifts are visible at a glance.
How to use
- Read the trend from the LONG/SHORT markers and EMA stack; trade with it.
- Use FVG and Order Block zones as areas to look for entries, partial exits or invalidation - not as automatic buy/sell signals.
- Confirm with HH/HL/LH/LL: continuation favours trend-aligned zones; a structure break warns of a possible shift.
Settings
Grouped by section - Main trend (length, multiplier, channel filter, plot channel), Moving Average (EMA lengths, mirrors, smoothing), Fair Value Gaps (show, max visible, colours), Order Blocks (show, max per side, search/structure length, max pivot age, colours), and HH/HL/LH/LL (show, swing length, lookback).
Alerts
- Change of the trend - fires when the Master Filter direction flips.
Notes
This indicator is a decision-support tool, not a signal-for-hire system. It does not place orders and past behaviour does not guarantee future results. Always combine it with your own risk management.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
How to get an access?
Telegram: t.me/MasterTrendPro
Website: master-trend.pro
Telegram: t.me/MasterTrendPro
Website: master-trend.pro
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
How to get an access?
Telegram: t.me/MasterTrendPro
Website: master-trend.pro
Telegram: t.me/MasterTrendPro
Website: master-trend.pro
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.