PROTECTED SOURCE SCRIPT
Algo MS+Multi MM/MTF+IFVG+Alert (LoCo_)

## Algo MS+Multi MM/MTF (LoCo_) — ULTRA DETAILED VERSION (User Guide)
**Algo MS+Multi MM/MTF (LoCo_)** is an all-in-one indicator designed to combine:
* **Trend & direction** using **MAs + MTF MAs**
* **Market structure** (breaks / reversals / BOS / EPA / extremes)
* **Imbalance zones** using **IFVG**
* **Filtered technical signals** using **SMA7/EMA20 crossovers**
* **Instant multi-timeframe overview** using the **MTF table** (direction + exact level)
The script is **modular**: each block can be enabled/disabled to keep your chart clean.
---
# 1) Display Options (main menu)
In **Display Options**, you control the visibility of the 4 main visual modules:
### ✅ 1) MAs (current timeframe)
* **Show MAs**: displays the local moving averages (up to 8)
* **MA Labels**: displays dynamic “SMA/EMA + length” labels to the right of price
### ✅ 2) MTF MAs (Multi-Timeframe)
* **Show MTF MAs**: displays MAs calculated on other timeframes
* **MTF Label**: displays timeframe labels + dotted connector line to the label
### ✅ 3) IFVG
* **Show FVG**: enables/disables the IFVG module entirely
### ✅ 4) Signal 7/20 + Table
* **Signal 7/20**: enables/disables SMA7/EMA20 crossover signals + filters
* **Table**: shows the MTF table (bottom-left)
---
# 2) “MAs” module (current timeframe)
This module displays up to **8 configurable MAs** (length/color/width).
* Includes an **EMA 20** (instead of an SMA20)
* MAs act as:
* immediate trend direction
* dynamic reaction zones
* “living” support/resistance
### MA Labels
* Labels are dynamic and automatically reposition on the right.
* They display: **SMA7 / EMA20 / SMA50…** depending on the MA.
✅ Typical use:
* Price above main MAs = bullish bias
* Price below = bearish bias
* Reactions on EMA20/SMA50/SMA200 = key zones
---
# 3) “MTF MAs” module (Multi-Timeframe)
This block displays a **moving average computed on other timeframes** directly on your current chart.
### How it works
* You choose **one single MA length** (e.g., 800)
* You choose up to **7 timeframes**
* The script computes each HTF MA and plots it on your current timeframe
### Smart display
* If an MTF MA timeframe equals the chart timeframe, it is **hidden** (avoids duplicates)
* Unselected timeframes are not computed (optimization)
### MTF Labels + dotted connector line
* Label: shows the timeframe (e.g., 5min, 1H, 1D)
* Dotted line: links the MA to the label for instant readability
### MTF Mode: Confirmed vs Smoothed
* **Confirmed (no repaint)**: the HTF MA updates only when the HTF candle closes
→ recommended for signal/strict reading
* **Smoothed (repaint)**: smoother because it updates with the current forming HTF candle
→ recommended for a more continuous visual display
### Gaps (continuous / with breaks)
* **Continuous (gaps_off)**: continuous lines
* **With breaks (gaps_on)**: respects HTF structure and its step changes
✅ Typical use (example):
* On **M15**, display an MA from **H1 / H4 / Daily**
* This gives you macro bias and key zones without leaving your chart
---
# 4) IFVG (Inversion Fair Value Gaps)
This module detects **FVGs** and then displays only **inversions**:
* An FVG is an imbalance zone (a “structural gap”)
* An inversion happens when price crosses/invalidates the zone and may flip it into the opposite side
### IFVG Settings
* **Show Last**: how many recent IFVGs to display
⚠️ they appear in bull/bear pairs → increasing this may show more than expected
* **Signal Preference**
* Close: stricter signals
* Wick: more sensitive (uses wicks)
* **ATR Multiplier (default = 0.01)**
Filters out tiny zones:
* higher = fewer zones (stricter)
* lower = more zones (more sensitive)
✅ Typical use:
* IFVG = zones where price may:
* react (bounce/reject)
* accelerate (clean break)
* retrace into before continuation
---
# 5) Signal 7/20 (filtered crossovers) — anti-false-signal module
This module detects:
* **Buy**: SMA7 crosses above EMA20
* **Sell**: SMA7 crosses below EMA20
But most importantly, it can apply up to **6 filters** (each can be enabled individually).
## The 6 Filters
### 1) HTF trend filter (trend EMA)
Goal: avoid taking buys against the higher-timeframe trend.
* Buy allowed if HTF close > HTF EMA
* Sell allowed if HTF close < HTF EMA
### 2) Range/Trend filter
Goal: avoid signals inside a weak range.
* **ADX mode**: requires ADX > threshold
* **BB Width mode**: requires band width > threshold
### 3) Slope / momentum filter
Goal: don’t buy if the EMA isn’t rising.
* Buy: EMA > EMA[lookback]
* Sell: EMA < EMA[lookback]
### 4) Close confirmation filter
Goal: avoid crosses that happen right on the line.
* Buy: close above both SMA and EMA
* Sell: close below both SMA and EMA
### 5) ATR volatility filter
Goal: avoid markets that are too “tight” / low movement.
* ATR must be > ATR average * multiplier
### 6) Cooldown (anti-spam)
Goal: prevent signal clustering.
* enforces a minimum number of bars between signals
### Arrows
* Displayed above/below candles
* Size is adjustable
✅ Typical use:
* Scalping: HTF trend + Range/Trend + Cooldown (minimum)
* Intraday: add slope + close confirmation
* Volatile markets: enable ATR filter
---
# 6) MTF Table (direction + EXACT level)
The **table** (bottom-left) shows, for 4 selectable timeframes:
* **TF**
* **Break** (Bull/Bear)
* **Exact level** (precise crossover price)
### Exact level: why it matters
Instead of using the candle value, the script calculates the SMA/EMA intersection via **linear interpolation**:
* compute the difference (SMA - EMA)
* find where that difference crosses zero between bar [1] and bar [0]
→ gives a **more precise price** than using close/high/low.
✅ Typical use:
* quickly see where crossovers happened on M5/M15/M30/H1
* check if current price is above/below the exact level
---
# 7) Market Structure TF1 (break, reversal, BOS, EPA, extremes)
This market structure module displays:
* structure pivots (high/low)
* **ILQ (Break)**: break levels
* **TLQ (Reversal)**: reversal levels
* Optional **BOS**: BOS tags at breaks
* **EPA**: efficiency levels/zone (with optional delete unfilled)
* **Extreme**: extreme zones that extend while valid
✅ Typical use:
* identify key structural zones (break/reversal)
* use TLQ/ILQ as confirmation levels
* use EPA/Extreme as reaction/invalidation zones
---
# Suggested Workflows (practical examples)
## Workflow A — “Trend-follow” (simplest)
1. Enable **MAs** + **MTF MAs**
2. Set MTF MA timeframes to **H1/H4/D**
3. Bias:
* Price above MTF MA → long bias
* Price below → short bias
4. Use **Signal 7/20** only in the bias direction
5. Use **IFVG** as entry/return zones
## Workflow B — “Structure + confirmation”
1. Enable **Market Structure TF1**
2. Wait for a zone:
* TLQ / ILQ / EPA / Extreme
3. Use **Signal 7/20** as confirmation
4. Check the **MTF Table**:
* multiple TFs bullish → stronger confirmation
## Workflow C — “Entry on IFVG zone”
1. Enable IFVG
2. Spot a recent inversion zone
3. Wait for price to revisit the zone
4. Confirm using:
* EMA slope filter
* close confirmation
* (optional) HTF trend filter
---
# Quick recommended settings
### Scalping (M1/M3/M5)
* HTF trend: 15/60
* Range/Trend: ADX threshold ~20
* Cooldown: 8–15 bars
* IFVG ATR mult: 0.01 to 0.05 depending on volatility
### Intraday (M15/M30/H1)
* HTF trend: H1/H4
* Range/Trend: BB Width if you trade squeezes
* Close confirmation: ON
* IFVG: Show Last 3–8
---
## Important notes
* MTF **Smoothed (repaint)**: looks nicer but can repaint.
MTF **Confirmed (no repaint)**: recommended for strict reading.
* IFVG “Show Last”: may show more than expected because the system uses **pairs** (bull/bear + inversion), so it can scale non-linearly depending on market flow.
---
**Algo MS+Multi MM/MTF (LoCo_)** is an all-in-one indicator designed to combine:
* **Trend & direction** using **MAs + MTF MAs**
* **Market structure** (breaks / reversals / BOS / EPA / extremes)
* **Imbalance zones** using **IFVG**
* **Filtered technical signals** using **SMA7/EMA20 crossovers**
* **Instant multi-timeframe overview** using the **MTF table** (direction + exact level)
The script is **modular**: each block can be enabled/disabled to keep your chart clean.
---
# 1) Display Options (main menu)
In **Display Options**, you control the visibility of the 4 main visual modules:
### ✅ 1) MAs (current timeframe)
* **Show MAs**: displays the local moving averages (up to 8)
* **MA Labels**: displays dynamic “SMA/EMA + length” labels to the right of price
### ✅ 2) MTF MAs (Multi-Timeframe)
* **Show MTF MAs**: displays MAs calculated on other timeframes
* **MTF Label**: displays timeframe labels + dotted connector line to the label
### ✅ 3) IFVG
* **Show FVG**: enables/disables the IFVG module entirely
### ✅ 4) Signal 7/20 + Table
* **Signal 7/20**: enables/disables SMA7/EMA20 crossover signals + filters
* **Table**: shows the MTF table (bottom-left)
---
# 2) “MAs” module (current timeframe)
This module displays up to **8 configurable MAs** (length/color/width).
* Includes an **EMA 20** (instead of an SMA20)
* MAs act as:
* immediate trend direction
* dynamic reaction zones
* “living” support/resistance
### MA Labels
* Labels are dynamic and automatically reposition on the right.
* They display: **SMA7 / EMA20 / SMA50…** depending on the MA.
✅ Typical use:
* Price above main MAs = bullish bias
* Price below = bearish bias
* Reactions on EMA20/SMA50/SMA200 = key zones
---
# 3) “MTF MAs” module (Multi-Timeframe)
This block displays a **moving average computed on other timeframes** directly on your current chart.
### How it works
* You choose **one single MA length** (e.g., 800)
* You choose up to **7 timeframes**
* The script computes each HTF MA and plots it on your current timeframe
### Smart display
* If an MTF MA timeframe equals the chart timeframe, it is **hidden** (avoids duplicates)
* Unselected timeframes are not computed (optimization)
### MTF Labels + dotted connector line
* Label: shows the timeframe (e.g., 5min, 1H, 1D)
* Dotted line: links the MA to the label for instant readability
### MTF Mode: Confirmed vs Smoothed
* **Confirmed (no repaint)**: the HTF MA updates only when the HTF candle closes
→ recommended for signal/strict reading
* **Smoothed (repaint)**: smoother because it updates with the current forming HTF candle
→ recommended for a more continuous visual display
### Gaps (continuous / with breaks)
* **Continuous (gaps_off)**: continuous lines
* **With breaks (gaps_on)**: respects HTF structure and its step changes
✅ Typical use (example):
* On **M15**, display an MA from **H1 / H4 / Daily**
* This gives you macro bias and key zones without leaving your chart
---
# 4) IFVG (Inversion Fair Value Gaps)
This module detects **FVGs** and then displays only **inversions**:
* An FVG is an imbalance zone (a “structural gap”)
* An inversion happens when price crosses/invalidates the zone and may flip it into the opposite side
### IFVG Settings
* **Show Last**: how many recent IFVGs to display
⚠️ they appear in bull/bear pairs → increasing this may show more than expected
* **Signal Preference**
* Close: stricter signals
* Wick: more sensitive (uses wicks)
* **ATR Multiplier (default = 0.01)**
Filters out tiny zones:
* higher = fewer zones (stricter)
* lower = more zones (more sensitive)
✅ Typical use:
* IFVG = zones where price may:
* react (bounce/reject)
* accelerate (clean break)
* retrace into before continuation
---
# 5) Signal 7/20 (filtered crossovers) — anti-false-signal module
This module detects:
* **Buy**: SMA7 crosses above EMA20
* **Sell**: SMA7 crosses below EMA20
But most importantly, it can apply up to **6 filters** (each can be enabled individually).
## The 6 Filters
### 1) HTF trend filter (trend EMA)
Goal: avoid taking buys against the higher-timeframe trend.
* Buy allowed if HTF close > HTF EMA
* Sell allowed if HTF close < HTF EMA
### 2) Range/Trend filter
Goal: avoid signals inside a weak range.
* **ADX mode**: requires ADX > threshold
* **BB Width mode**: requires band width > threshold
### 3) Slope / momentum filter
Goal: don’t buy if the EMA isn’t rising.
* Buy: EMA > EMA[lookback]
* Sell: EMA < EMA[lookback]
### 4) Close confirmation filter
Goal: avoid crosses that happen right on the line.
* Buy: close above both SMA and EMA
* Sell: close below both SMA and EMA
### 5) ATR volatility filter
Goal: avoid markets that are too “tight” / low movement.
* ATR must be > ATR average * multiplier
### 6) Cooldown (anti-spam)
Goal: prevent signal clustering.
* enforces a minimum number of bars between signals
### Arrows
* Displayed above/below candles
* Size is adjustable
✅ Typical use:
* Scalping: HTF trend + Range/Trend + Cooldown (minimum)
* Intraday: add slope + close confirmation
* Volatile markets: enable ATR filter
---
# 6) MTF Table (direction + EXACT level)
The **table** (bottom-left) shows, for 4 selectable timeframes:
* **TF**
* **Break** (Bull/Bear)
* **Exact level** (precise crossover price)
### Exact level: why it matters
Instead of using the candle value, the script calculates the SMA/EMA intersection via **linear interpolation**:
* compute the difference (SMA - EMA)
* find where that difference crosses zero between bar [1] and bar [0]
→ gives a **more precise price** than using close/high/low.
✅ Typical use:
* quickly see where crossovers happened on M5/M15/M30/H1
* check if current price is above/below the exact level
---
# 7) Market Structure TF1 (break, reversal, BOS, EPA, extremes)
This market structure module displays:
* structure pivots (high/low)
* **ILQ (Break)**: break levels
* **TLQ (Reversal)**: reversal levels
* Optional **BOS**: BOS tags at breaks
* **EPA**: efficiency levels/zone (with optional delete unfilled)
* **Extreme**: extreme zones that extend while valid
✅ Typical use:
* identify key structural zones (break/reversal)
* use TLQ/ILQ as confirmation levels
* use EPA/Extreme as reaction/invalidation zones
---
# Suggested Workflows (practical examples)
## Workflow A — “Trend-follow” (simplest)
1. Enable **MAs** + **MTF MAs**
2. Set MTF MA timeframes to **H1/H4/D**
3. Bias:
* Price above MTF MA → long bias
* Price below → short bias
4. Use **Signal 7/20** only in the bias direction
5. Use **IFVG** as entry/return zones
## Workflow B — “Structure + confirmation”
1. Enable **Market Structure TF1**
2. Wait for a zone:
* TLQ / ILQ / EPA / Extreme
3. Use **Signal 7/20** as confirmation
4. Check the **MTF Table**:
* multiple TFs bullish → stronger confirmation
## Workflow C — “Entry on IFVG zone”
1. Enable IFVG
2. Spot a recent inversion zone
3. Wait for price to revisit the zone
4. Confirm using:
* EMA slope filter
* close confirmation
* (optional) HTF trend filter
---
# Quick recommended settings
### Scalping (M1/M3/M5)
* HTF trend: 15/60
* Range/Trend: ADX threshold ~20
* Cooldown: 8–15 bars
* IFVG ATR mult: 0.01 to 0.05 depending on volatility
### Intraday (M15/M30/H1)
* HTF trend: H1/H4
* Range/Trend: BB Width if you trade squeezes
* Close confirmation: ON
* IFVG: Show Last 3–8
---
## Important notes
* MTF **Smoothed (repaint)**: looks nicer but can repaint.
MTF **Confirmed (no repaint)**: recommended for strict reading.
* IFVG “Show Last”: may show more than expected because the system uses **pairs** (bull/bear + inversion), so it can scale non-linearly depending on market flow.
---
Script protetto
Questo script è pubblicato come codice protetto. Tuttavia, è possibile utilizzarle liberamente e senza alcuna limitazione – ulteriori informazioni qui.
Declinazione di responsabilità
Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.
Script protetto
Questo script è pubblicato come codice protetto. Tuttavia, è possibile utilizzarle liberamente e senza alcuna limitazione – ulteriori informazioni qui.
Declinazione di responsabilità
Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.