Trend Regularity Adaptive Moving Average

# TRAMA — Trend Regularity Adaptive Moving Average


**A moving average that knows the difference between a trend and noise — and adapts its speed automatically, bar by bar.**

Most moving averages force you to pick one speed and live with it: fast enough to catch trends, and it whips you around in every chop; slow enough to survive chop, and it lags every real move. TRAMA (Trend Regularity Adaptive Moving Average) removes that trade-off. It measures how *regularly* price has been making new highs or new lows over the lookback window — a genuine, one-directional trend — and speeds up only when that regularity is high. The moment price starts alternating between new highs and new lows (chop, range, indecision), TRAMA automatically slows down and flattens out, filtering the noise without you touching a single setting.

## How it works

For every bar, TRAMA checks two things over the lookback `Length`:

1. Did the rolling **highest high** just make a new high? Did the rolling **lowest low** just make a new low?
2. How often has that happened across the last `Length` bars — i.e., how *regular* is the directional movement?

That regularity score (0 to 1) is squared and used as the smoothing constant of a recursive moving average. High regularity (a clean, sustained trend) → the constant approaches 1 → TRAMA hugs price closely and reacts fast. Low regularity (price chopping both ways) → the constant approaches 0 → TRAMA barely moves, staying flat through the noise.

The result: a single, self-adjusting line that stretches out and tracks price tightly during real trends, and goes nearly flat during ranges — with no separate "trend detector" or second indicator required.

## Features

- ✅ **Fully adaptive** — one `Length` input, no fast/slow period pair to tune
- ✅ **Flattens in ranges automatically** — filters chop without lag-heavy extra smoothing
- ✅ **Tracks price tightly in trends** — reacts faster than a fixed-period MA of the same length
- ✅ **Selectable price source** — Close, Open, High, Low, Median, Typical, Weighted
- ✅ **Non-repainting** — calculated on confirmed history, incremental updates each tick
- ✅ Lightweight — no DLLs, no external dependencies
- ✅ Works on **any symbol and any timeframe**
- ✅ Available for both **MetaTrader 5** and **MetaTrader 4**

## How to trade / read signals with it

TRAMA is a trend filter and dynamic support/resistance line, not a signal generator with arrows — read it the way you'd read any adaptive trend MA:

| What you see | What it means |
|---|---|
| Line **flat / barely moving** | No regular trend — price is ranging or choppy. Stand aside or trade the range, not the trend. |
| Line **sloping and tracking price closely** | A regular trend is underway — the more the line tilts and hugs price, the stronger the directional regularity. |
| **Price above a rising line** | Uptrend bias — look for longs |
| **Price below a falling line** | Downtrend bias — look for shorts |
| **Price crosses the line after it was flat** | Possible start of a new trend leg — early signal, wait for the line itself to start sloping in the same direction before trusting it |
| **Price pulls back to the line and holds** | Trend intact — treat the line as dynamic support (uptrend) / resistance (downtrend) |

**Long playbook:**
1. Wait for the line to slope up and price to be trading above it.
2. Enter on a pullback to the line that holds (price doesn't close back below it).
3. Stop-loss below the most recent swing low, or a fixed ATR distance.
4. Exit when price closes back through the line, or when the line itself flattens out.

**Short playbook:** mirror the above on a falling line with price below it.

**Signals to skip:**
- A single price/line cross while the line is still flat — that's noise, not a new trend, by TRAMA's own design.
- Trading against a clearly sloped higher-timeframe TRAMA.
- Entries right into major news releases — no trend filter substitutes for volatility risk management.

**Tip:** because TRAMA already filters chop internally, it pairs well with a simple slope/angle rule (e.g., "only trade when the line has moved X points over the last N bars") instead of adding a second, correlated indicator like ADX.

## Input parameters

| Parameter | Default | Description |
|---|---|---|
| **Length** | 99 | Lookback window used for the highest/lowest regularity measurement and the adaptive smoothing |
| **Source** | Close | Applied price: Close, Open, High, Low, Median, Typical, Weighted |

**Tuning tips:** a larger `Length` produces a smoother, more conservative line that needs a longer, more regular trend before it speeds up — good for higher timeframes and swing trading. A smaller `Length` reacts faster but resets its "regularity memory" more quickly, giving more (and earlier) signals at the cost of more false starts.

## Notes

- Faithful port of the original TRAMA concept published for TradingView by LuxAlgo, rebuilt natively for MetaTrader (both MT5 and MT4 versions included/available).
- Calculation is fully incremental — efficient even with a large `Length` on high tick-volume symbols.
- Questions, suggestions, or a feature request? Leave a comment — happy to extend it (e.g. optional slope-based coloring or alerts) on request.
Yazarın diğer ürünleri
This indicator presents an alternative approach to identify Market Structure. The logic used is derived from learning material created by   DaveTeaches (on X) Upgrade v1.10: add option to put protected high/low value to buffer (figure 11, 12) When quantifying Market Structure, it is common to use fractal highs and lows to identify "significant" swing pivots. When price closes through these pivots, we may identify a Market Structure Shift (MSS) for reversals or a Break of Structure (BOS) for co
The liquidity swings indicator highlights swing areas with existent trading activity. The number of times price revisited a swing area is highlighted by a zone delimiting the swing areas. Additionally, the accumulated volume within swing areas is highlighted by labels on the chart. An option to filter out swing areas with volume/counts not reaching a user-set threshold is also included. This indicator by its very nature is not real-time and is meant for descriptive analysis alongside other com
This is addition of  Effective SV squeeze momentum  that add bolliger band and Keltner channel to chart window.  Squeeze momentum introduced by “John Carter”, the squeeze indicator for MT5 represents a volatility-based tool. Regardless, we can also consider the squeeze indicator as a momentum indicator, as many traders use it to identify the direction and strength of price moves. In fact, the Tradingview  squeeze indicator shows when a financial instrument is willing to change from a trending ma
FREE
The Bheurekso Pattern Indicator for MT5 helps traders automatically identify candlestick pattern that formed on the chart base on some japanese candle pattern and other indicator to improve accurate. This indicator scans all candles, recognizes and then displays any candle patterns formed on the chart. The candle displayed can be Bullish or Bearish Engulfing, Bullish or Bearish Harami, and so on. There are some free version now but almost that is repaint and lack off alert function. With this ve
The Breaker Blocks with Signals indicator aims to highlight a complete methodology based on breaker blocks. Breakout signals between the price and breaker blocks are highlighted and premium/discount swing levels are included to provide potential take profit/stop loss levels. This script also includes alerts for each signal highlighted.   SETTINGS   Breaker Blocks Length: Sensitivity of the detected swings used to construct breaker blocks. Higher values will return longer term break
This is a Forex Scalping Trading Sytem based on the Bollinger Bands.  Pairs:Major Time frame: 1M or higher. Spread max:0,0001.  Indicators (just suggestion) Bollinger bands (20, 2); ADX (14 period); RSI   (7 period ). Y ou should only trade this system between 2am to 5am EST, 8am to 12am EST and 7.30pm to 10pm EST. Do not scalp 30 minutes before a orange or red news  report and not for a hour afterwards.   Setup: is for price to move above the lower or lower Bollinger Bands, RSI raise above the
FREE
Multiple Wicks forming at OverSold & OverBought levels create Buying and Selling Pressure. This indicator tries to capture the essence of the buy and sell pressure created by those wicks. Wick pressure shows that the trend is Exhausted. Order block should display when buying or selling pressure wick. When price go inside buy order block and up to outside order block, trader should consider a buy order. If price go inside buy order block and down to outside order block, trader should consider a s
OVERVIEW K-means is a clustering algorithm commonly used in machine learning to group data points into distinct clusters based on their similarities. While K-means is not typically used directly for identifying support and resistance levels in financial markets, it can serve as a tool in a broader analysis approach. Support and resistance levels are price levels in financial markets where the price tends to react or reverse. Support is a level where the price tends to stop falling and m
All about Smart Money Concepts Strategy: Market struture: internal or swing BOS, CHoCH; Orderblock; Liquity equal; Fair Value Gap with Consequent encroachment, Balanced price range; Level with Previous month, week, day level or in day level (PMH, PWH, PDH, HOD); BuySell Stops Liquidity (BSL, SSL); Liquidity Void Long Wicks; Premium and Discount; Candle pattern ... "Smart Money Concepts" ( SMC ) is a fairly new yet widely used term amongst price action traders looking to more accurately navigate
The indicator   returning pivot point based trendlines with highlighted breakouts . Trendline caculated by pivot point and other clue are ATR, Stdev.   The indicator also includes integrated alerts for  trendlines  breakouts   and foward message to Telegram channel or group if you want. Settings ·            Lookback bar: Default 200 is number of bar caculate when init indicator. ·            Length:  Pivot points  period ·            Slope Calculation Method: Determines how this lope is calcula
This all-in-one indicator displays real-time market structure (internal & swing BOS / CHoCH), order blocks, premium & discount zones, equal highs & lows, and much more...allowing traders to automatically mark up their charts with widely used price action methodologies. Following the release of our Fair Value Gap script, we received numerous requests from our community to release more features in the same category. //------------------------------------// Version 1.x has missing functions + PDAr
The Breaker Blocks with Signals indicator aims to highlight a complete methodology based on breaker blocks. Breakout signals between the price and breaker blocks are highlighted and premium/discount swing levels are included to provide potential take profit/stop loss levels. This script also includes alerts for each signal highlighted.   SETTINGS   Breaker Blocks Length: Sensitivity of the detected swings used to construct breaker blocks. Higher values will return longer term break
The ICT Concepts indicator regroups core concepts highlighted by trader and educator "The Inner Circle Trader" (ICT) into an all-in-one toolkit. Features include Market Structure (MSS & BOS), Order Blocks, Imbalances, Buyside/Sellside Liquidity, Displacements, ICT Killzones, and New Week/Day Opening Gaps. It’s one kind of Smart money concepts.   USAGE:   Please read this   document  !      DETAILS Market Structure Market structure labels are constructed from price breaking a prior extreme
The FollowLine indicator is a trend following indicator. The blue/red lines are activated when the price closes above the upper Bollinger band or below the lower one. Once the trigger of the trend direction is made, the FollowLine will be placed at High or Low (depending of the trend). An ATR filter can be selected to place the line at a more distance level than the normal mode settled at candles Highs/Lows. Some features: + Trend detech + Reversal signal + Alert teminar / mobile app
The ICT Silver Bullet indicator is inspired from the lectures of "The Inner Circle Trader" (ICT) and highlights the Silver Bullet (SB) window which is a specific 1-hour interval where a Fair Value Gap (FVG) pattern can be formed. A detail document about ICT Silver Bullet here . There are 3 different Silver Bullet windows (New York local time): The London Open Silver Bullet (3 AM — 4 AM ~ 03:00 — 04:00) The AM Session Silver Bullet (10 AM — 11 AM ~ 10:00 — 11:00) The PM Session Silver Bullet (2
This indicator shows when user set sessions are active and returns various tools + metrics using the closing price within active sessions as an input. Users have the option to change up to 4 session times. The indicator will increasingly lack accuracy when the chart timeframe is higher than 1 hour. Settings Sessions Enable Session: Allows to enable or disable all associated elements with a specific user set session. Session Time: Opening and closing times of the user set session in the  
The liquidity swings indicator highlights swing areas with existent trading activity. The number of times price revisited a swing area is highlighted by a zone delimiting the swing areas. Additionally, the accumulated volume within swing areas is highlighted by labels on the chart. An option to filter out swing areas with volume/counts not reaching a user-set threshold is also included. This indicator by its very nature is not real-time and is meant for descriptive analysis alongside other com
The SuperTrend AI indicator is a novel take on bridging the gap between the K-means clustering machine learning method & technical indicators. In this case, we apply K-Means clustering to the famous SuperTrend indicator.   USAGE Users can interpret the SuperTrend AI trailing stop similarly to the regular SuperTrend indicator. Using higher minimum/maximum factors will return longer-term signals. (image 1) The displayed performance metrics displayed on each signal allow for a deeper interpretat
OVERVIEW A Lorentzian Distance Classifier (LDC) is a Machine Learning classification algorithm capable of categorizing historical data from a multi-dimensional feature space. This indicator demonstrates how Lorentzian Classification can also be used to predict the direction of future price movements when used as the distance metric for a novel implementation of an Approximate Nearest Neighbors (ANN) algorithm. This indicator provide signal as buffer, so very easy for create EA from this indi
This script automatically calculates and updates ICT's daily IPDA look back time intervals and their respective discount / equilibrium / premium, so you don't have to :) IPDA stands for Interbank Price Delivery Algorithm. Said algorithm appears to be referencing the past 20, 40, and 60 days intervals as points of reference to define ranges and related PD arrays. Intraday traders can find most value in the 20 Day Look Back box, by observing imbalances and points of interest. Longer term traders c
An Implied Fair Value Gap (IFVG) is a three candles imbalance formation conceptualized by ICT that is based on detecting a larger candle body & then measuring the average between the two adjacent candle shadows. This indicator automatically detects this imbalance formation on your charts and can be extended by a user set number of bars. The IFVG average can also be extended until a new respective IFVG is detected, serving as a support/resistance line. Alerts for the detection of bullish/be
Consolidation is when price is moving inside a clear trading range. When prices are consolidated it shows the market maker placing orders on both sides of the market. This is mainly due to manipulate the un informed money. This indicator automatically identifies consolidation zones and plots them on the chart. The method of determining consolidation zones is based on pivot points and ATR, ensuring precise identification. The indicator also sends alert notifications to users when a new consolida
This indicator provides the ability to recognize the SMC pattern, essentially a condensed version of the Wyckoff model. Once the pattern is confirmed by RTO, it represents a significant investment opportunity.    There are numerous indicators related to SMC beyond the market, but this is the first indicator to leverage patterns to identify specific actions of BigBoy to  navigate the market. Upgrade 2024-03-08: Add TP by RR feature. The SMC (Smart Money Concept)   pattern   is a market analysis m
Created by imjesstwoone and mickey1984, this trade model attempts to capture the expansion from the 10:00-14:00 EST 4h candle using just 3 simple steps. All of the information presented in this description has been outlined by its creators, all I did was translate it to MQL4. All core settings of the trade model may be edited so that users can test several variations, however this description will cover its default, intended behavior using NQ 5m as an example. Step 1 is to identify our Price Ra
The Buyside & Sellside Liquidity indicator aims to detect & highlight the first and arguably most important concept within the ICT trading methodology,   Liquidity   levels. SETTINGS Liquidity Levels Detection Length: Lookback period Margin: Sets margin/sensitivity for a liquidity level detection Liquidity Zones Buyside Liquidity Zones: Enables display of the buyside liquidity zones. Margin: Sets margin/sensitivity for the liquidity zone boundaries. Color: Color option for buysid
The   Liquidation Estimates (Real-Time)   experimental indicator attempts to highlight real-time long and short liquidations on all timeframes. Here with liquidations, we refer to the process of forcibly closing a trader's position in the market. By analyzing liquidation data, traders can gauge market sentiment, identify potential support and resistance levels, identify potential trend reversals, and make informed decisions about entry and exit points. USAGE (Img 1)    Liquidation refers
The   ICT Unicorn Model   indicator highlights the presence of "unicorn" patterns on the user's chart which is derived from the lectures of   "The Inner Circle Trader" (ICT) . Detected patterns are followed by targets with a distance controlled by the user.   USAGE (image 2) At its core, the ICT Unicorn Model relies on two popular concepts, Fair Value Gaps and Breaker Blocks. This combination highlights a future area of support/resistance. A   Bullish Unicorn Pattern   consists out of:
The Inversion Fair Value Gaps (IFVG) indicator is based on the inversion FVG concept by ICT and provides support and resistance zones based on mitigated Fair Value Gaps (FVGs). Image 1   USAGE Once mitigation of an FVG occurs, we detect the zone as an "Inverted FVG". This would now be looked upon for potential support or resistance. Mitigation occurs when the price closes above or below the FVG area in the opposite direction of its bias. (Image 2) Inverted Bullish FVGs Turn into Potenti
Overview The   Volume SuperTrend AI   is an advanced technical indicator used to predict trends in price movements by utilizing a combination of traditional SuperTrend calculation and AI techniques, particularly the k-nearest neighbors (KNN) algorithm. The Volume SuperTrend AI is designed to provide traders with insights into potential market trends, using both volume-weighted moving averages (VWMA) and the k-nearest neighbors (KNN) algorithm. By combining these approaches, the indicator
Introducing the Reversal and Breakout Signals   This innovative tool is crafted to enhance your chart analysis by identifying potential reversal and breakout opportunities directly on your charts. It's designed with both novice and experienced traders in mind, providing intuitive visual cues for better decision-making. Let's dive into the key features and how it operates: ###   Key Features:   Dynamic Period Settings:   Customize the sensitivity of the indicator with user-def
Filtrele:
Değerlendirme yok
Değerlendirmeye yanıt