OPEN-SOURCE SCRIPT

Equalhigh EMA Signature

210
Equalhigh — EMA Signature v2

### User Manual

**Equalhigh — EMA Signature v2** is an adaptive statistical support indicator designed to identify the EMA that a specific asset historically respects the most.

Instead of assuming that EMA 20, 50, 100, or 200 is automatically relevant, the indicator scans a configurable range of EMA periods and determines which one has historically produced the most reliable price rebounds.

The objective is to identify the asset's own **EMA Signature**.

---

## Concept

Different securities often react to different moving-average periods.

One stock may repeatedly rebound from EMA 21, another from EMA 34, another from EMA 57.

This indicator attempts to quantify that behavior by testing many EMA candidates and ranking them according to their historical effectiveness as dynamic support.

The strongest EMA is plotted directly on the chart.

The second-best EMA can also be displayed.

---

## How It Works

For every EMA candidate, the indicator looks for historical support tests.

A valid support test requires price to approach the EMA from above and enter a tolerance zone around the EMA.

Once the EMA is touched, the indicator observes the following candles and evaluates whether price produces a meaningful rebound.

Each EMA is evaluated using several statistics:

* Number of historical tests
* Number of successful rebounds
* Hit rate
* Average rebound magnitude
* Frequency of support breakdowns
* Statistical confidence
* Sample size

The highest-ranked EMA becomes the current **EMA Signature**.

---

# EMA Signature Score

The indicator does not simply choose the EMA with the highest raw win rate.

A result such as:

**EMA 137: 2 successful rebounds out of 2 = 100%**

should not automatically beat:

**EMA 34: 23 successful rebounds out of 30 = 76.7%**

The first result has too little statistical evidence.

For this reason, Equalhigh — EMA Signature uses a composite score.

### Score structure

* **65% — Statistical reliability**
* **15% — Rebound strength**
* **10% — Sample depth**
* **10% — Support integrity**

Statistical reliability uses a **Wilson lower confidence bound**, which penalizes very small samples.

This makes the ranking significantly more robust than a simple hit-rate comparison.

---

# Main Chart Elements

## Best EMA Signature

The strongest historical EMA is plotted as the main highlighted line.

The label displays:

**EMA period**

and

**Signature Score**

Example:

> ★ EMA 34
> Score 76.8

This means EMA 34 currently has the strongest statistical support profile among all EMA periods tested.

---

## Second-Best EMA

The second-highest-ranked EMA can optionally be displayed.

This is useful because some securities do not have one unique support EMA, but rather a cluster of closely related EMA periods.

For example:

* EMA 32
* EMA 34
* EMA 38

may all rank highly.

This can indicate a broader **dynamic support zone** rather than one exact mathematical line.

---

# Top 5 Dashboard

The dashboard ranks the five strongest EMA candidates.

### EMA

EMA period being evaluated.

Example:

**34**

means EMA 34.

---

### SCORE

The Equalhigh EMA Signature Score.

Higher values indicate stronger historical evidence that the EMA acts as dynamic support.

A practical interpretation:

| Score | Interpretation |
| -------: | --------------------- |
| 75+ | Very strong signature |
| 65–75 | Strong |
| 55–65 | Moderate |
| 45–55 | Weak |
| Below 45 | Low confidence |

These levels should be interpreted comparatively rather than as absolute probabilities.

---

### TESTS

Number of historical support interactions detected for the EMA.

A larger sample generally increases confidence.

An EMA with 25–40 tests is statistically much more meaningful than one with only 3–5 tests.

---

### HIT

Percentage of historical EMA tests that produced the required rebound.

Example:

**78.6%**

means that approximately 79% of detected support tests met the selected rebound criteria.

---

### AVG

Average maximum rebound after successful EMA tests.

Example:

**+6.3%**

means successful historical tests produced an average maximum rebound of approximately 6.3% during the selected evaluation window.

---

### BREAK

Percentage of support tests where price clearly lost the EMA.

Lower is generally better.

Example:

**10.7%**

indicates relatively strong support integrity.

---

### BULL

Historical success rate when the support test occurred during the indicator's bullish market regime.

This allows the user to compare general EMA behavior with behavior during favorable market conditions.

---

# Rebound Detection

A support interaction is not counted simply because the candle touches the EMA.

The indicator checks several conditions.

### 1. Approach from above

Price must approach the EMA from above.

This is important because the indicator is specifically searching for **dynamic support**, not resistance.

---

### 2. EMA touch zone

Price does not need to touch the EMA perfectly.

A tolerance based on ATR is used.

This is more realistic than requiring exact contact because markets rarely reverse at mathematically perfect levels.

---

### 3. Support must remain valid

Price is allowed to temporarily move slightly below the EMA.

However, a sufficiently large close below the EMA is treated as a support failure.

---

### 4. Rebound confirmation

After the EMA interaction, price must rise by the selected minimum percentage within the selected evaluation window.

Example:

**Minimum rebound = 3%**

**Evaluation window = 10 bars**

A successful test requires price to produce at least a 3% rebound during the following 10 candles.

---

# Settings

## Minimum EMA

Defines the shortest EMA included in the scan.

Default:

**10**

---

## Maximum EMA

Defines the longest EMA included in the scan.

Default:

**250**

---

## EMA Step

Controls the distance between tested EMA periods.

Example:

Minimum EMA = 10
Maximum EMA = 250
Step = 5

The indicator tests:

10, 15, 20, 25, 30...250

### Recommended

Use:

**5** for fast exploration

**2** for normal use

**1** for maximum precision

A Step of 1 allows unusual signatures such as:

EMA 37
EMA 43
EMA 61

to be discovered.

---

# Statistical Lookback

Defines how much historical data is used to evaluate each EMA.

Default:

**750 bars**

On a Daily chart, this represents roughly three years of trading history.

A longer lookback provides more observations but may include outdated market behavior.

A shorter lookback adapts faster to structural changes but reduces sample size.

---

# EMA Touch Tolerance — ATR

Defines how close price must come to the EMA to qualify as a support test.

Default:

**0.20 ATR**

ATR-based tolerance automatically adapts to the volatility of the security.

This makes the indicator more transferable between low-volatility stocks and highly volatile assets.

---

# Maximum Break Tolerance — ATR

Determines how far price may close below the EMA before the support is considered broken.

Default:

**0.35 ATR**

Increasing this value allows more temporary undercuts.

Decreasing it makes support validation stricter.

---

# Rebound Evaluation Window

Number of bars available for price to confirm a rebound.

Default:

**10 bars**

On a Daily chart:

10 bars ≈ two trading weeks.

---

# Minimum Rebound %

Defines the minimum move required for an EMA interaction to be classified as successful.

Default:

**3%**

For volatile securities, a larger requirement may be appropriate.

For defensive or low-volatility securities, a smaller value may be preferable.

---

# Minimum Number of Tests

Defines the minimum historical sample required before an EMA can qualify for the ranking.

Default:

**5**

Increasing this value makes the model more selective.

For long historical datasets, values between **7 and 10** may provide stronger statistical confidence.

---

# Touch Cooldown

Prevents several consecutive candles around the same EMA from being counted as separate independent support events.

Default:

**5 bars**

Without a cooldown, one prolonged consolidation around an EMA could artificially create many support tests.

---

# Suggested Daily Settings

For most liquid equities:

| Setting | Suggested value |
| -------------------- | --------------: |
| Minimum EMA | 10 |
| Maximum EMA | 250 |
| EMA Step | 2 |
| Statistical Lookback | 750 |
| Touch Tolerance | 0.20 ATR |
| Break Tolerance | 0.35 ATR |
| Rebound Window | 10 bars |
| Minimum Rebound | 3% |
| Minimum Tests | 5 |
| Cooldown | 5 bars |

---

# Practical Workflow

A useful workflow is to start with:

**EMA 10 → 250**

**Step = 5**

This quickly identifies the broad area where the strongest EMA may exist.

For example, the results may show:

EMA 30
EMA 35
EMA 40

as the strongest group.

The user can then change:

**Step = 1**

to perform a finer scan.

The final result may reveal something such as:

> EMA 34 — Score 77

This becomes the asset's current **EMA Signature**.

---

# How to Use the Indicator

EMA Signature should generally be treated as a **support context tool**, not as a standalone buy signal.

The setup becomes more interesting when price approaches the Best EMA while other factors confirm the level.

Examples include:

* Rising volume on the rebound
* Bullish candle structure
* Relative strength improvement
* Previous horizontal support
* Gap support
* Fair Value zone
* Oversold momentum
* Positive market regime
* Higher-timeframe trend alignment

The strongest opportunities generally occur when several independent forms of support converge around the same price level.

---

# Example

Suppose the indicator identifies:

**EMA 36**

with:

* Score: 78
* Tests: 27
* Hit rate: 81%
* Average rebound: +6.4%
* Break rate: 11%

Price then falls back toward EMA 36.

This does **not** mean the stock has an 81% probability of rising.

It means that, according to the historical rules selected in the indicator, EMA 36 has produced successful rebounds in approximately 81% of comparable historical interactions.

The current market context still matters.

---

# Why the Best EMA Can Change

EMA Signature is adaptive.

The best EMA may change because:

* volatility changes,
* market regime changes,
* the stock enters a stronger trend,
* institutional behavior changes,
* historical observations are added,
* old observations leave the lookback window.

For example:

EMA 50 may dominate during a slow long-term trend.

Later, EMA 21 may become dominant during a strong momentum phase.

This is intentional.

---

# Important Statistical Considerations

Historical interactions are not fully independent events.

EMA periods are also highly correlated.

For example:

EMA 34 and EMA 35 will naturally produce similar values.

Therefore, the indicator should not be interpreted as discovering a mathematically unique "perfect EMA".

A group such as:

EMA 32
EMA 34
EMA 36

should often be interpreted as a **support family or support zone**.

---

# Limitations

The indicator is based on historical price behavior.

It cannot anticipate:

* earnings surprises,
* profit warnings,
* regulatory decisions,
* macroeconomic shocks,
* geopolitical events,
* takeover announcements,
* major fundamental changes.

A historically strong EMA can fail abruptly when market conditions change.

The model also does not prove causality.

Price may appear to react to an EMA because the EMA overlaps with another important technical or fundamental price level.

---

# Best Use

Equalhigh — EMA Signature v2 is particularly useful for:

* Pullback trading
* Trend continuation setups
* Swing trading
* Dynamic support analysis
* Finding non-standard EMA periods
* Comparing support quality between securities
* Identifying repeated institutional price behavior
* Locating potential re-entry zones after a trend pullback

---

## Final Principle

Traditional technical analysis asks:

> **Does this stock respect EMA 20, EMA 50 or EMA 200?**

Equalhigh — EMA Signature asks a different question:

> **Which EMA has this stock actually respected the most?**

The indicator then lets the historical data provide the answer.

---

**Equalhigh — EMA Signature v2**

*Adaptive EMA discovery through statistical rebound analysis.*

**Disclaimer:** This indicator is provided for research and educational purposes only. Historical statistical behavior does not guarantee future performance and should not be considered financial advice.

Wyłączenie odpowiedzialności

Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.