t3_Aroon_Horn_Osc_v1

Download script
Author: Copyright � 2005,
t3_Aroon_Horn_Osc_v1

This technical indicator is designed to provide traders with a smoothed, refined view of market momentum by combining two distinct mathematical philosophies: the Aroon Horn logic and the T3 moving average algorithm. By blending these methods, the script aims to filter out "market noise"—the erratic, minor price fluctuations—to highlight more significant trends.

Core Components of the Logic

1. The Base Signal (Aroon Horn) The indicator first looks at the "Aroon Horn" data. This serves as the raw input. It essentially monitors how recently the market has reached new highs or lows over a specific period. It helps identify whether the market is trending strongly in one direction or remains in a state of consolidation.

2. The Differential Calculation Instead of looking at a single price point, the script calculates the difference between two consecutive values of the Aroon Horn signal. By subtracting these values (the difference between the current and previous data points), the logic focuses on the velocity or change in the momentum rather than just the momentum itself.

3. Multi-Stage Smoothing (The T3 Filter) This is where the script provides its unique edge. The raw difference calculated above passes through a sophisticated "T3" filtering process. Unlike a standard moving average which can be sluggish or laggy, the T3 uses a series of recursive calculations (represented as e1 through e6 in the logic).

Think of this as a multi-layered sieve:

  • It processes the data through six successive stages of weight distribution.
  • Each stage "refines" the data further, reducing volatility while attempting to stay as close to the actual price action as possible.
  • This ensures that the resulting line on your chart is smooth and fluid, making it easier for a human observer to spot clear shifts in trend direction.

4. Final Scaling In the final step, the script applies a specific set of coefficients (pre-calculated constants) to these smoothed values and scales them by a factor of 1000. This transforms the abstract mathematical results into a readable oscillator format, allowing you to visualize the strength and direction of the trend clearly in a separate window on your chart.

Summary for the Trader

In plain terms, this script takes raw momentum data, calculates how fast that momentum is changing, and then runs it through a high-precision smoothing filter six times over. The goal is to provide you with a "clean" line that reflects the underlying trend of the market while ignoring the distracting "jitter" of everyday price movements.

Miscellaneous
Implements a curve of type %1
9 Views
0 Downloads
0 Favorites
t3_Aroon_Horn_Osc_v1
/*-----------------------------+
|			       |
| Shared by www.Aptrafx.com    |
|			       |
+------------------------------*/

//+-------------------------------------------------------------------------+
//| t3_Aroon_Horn_Osc.mq4                                                   |
//| Copyright © 2005,                                                       |
//| http://finance.groups.yahoo.com/group/MetaTrader_Experts_and_Indicators/|
//+-------------------------------------------------------------------------+
#property copyright "Copyright © 2005,"
#property link      "http://finance.groups.yahoo.com/group/MetaTrader_Experts_and_Indicators/"

#property indicator_separate_window
#property indicator_buffers 1
#property indicator_color1 DodgerBlue
#property indicator_level1 0

extern double Aroon_Horn_Period = 5.0;
extern double T3_Period = 5.0;
extern double b = 0.500;
extern int CountBars=200;

double MapBuffer[];

double e1,e2,e3,e4,e5,e6;
double c1,c2,c3,c4;
double n,w1,w2,b2,b3;
double m1,m2,med;

//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
  {
//---- indicators setting
    SetIndexStyle(0,DRAW_LINE,STYLE_SOLID,1,DodgerBlue);
    IndicatorDigits(MarketInfo(Symbol(),MODE_DIGITS));
    IndicatorShortName("t3_Aroon_Horn_Osc "+T3_Period);
    
    SetIndexBuffer(0,MapBuffer);

//---- variable reset

    e1=0; e2=0; e3=0; e4=0; e5=0; e6=0;
    c1=0; c2=0; c3=0; c4=0; 
    n=0; 
    w1=0; w2=0; 
    b2=0; b3=0;

    b2=b*b;
    b3=b2*b;
    c1=-b3;
    c2=(3*(b2+b3));
    c3=-3*(2*b2+b+b3);
    c4=(1+3*b+b3+3*b2);
    n=T3_Period;

    if (n<1) n=1;
    n = 1 + (0.5*(n-1));
    w1 = 2 / (n + 1);
    w2 = 1 - w1;
    
//----
    return(0);
  }

//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int start()
  {
   int limit=500;

//---- indicator calculation

    for(int i=limit; i>=0; i--)
    {
        
        m1=(iCustom(Symbol(), 0, "Aroon_Horn",Aroon_Horn_Period,0,i));
        m2=(iCustom(Symbol(), 0, "Aroon_Horn",Aroon_Horn_Period,1,i));
        //m1=(High[i]-Low[i]);
        //m2=(High[i+1]-Low[i+1]);
        med=m1-m2;
        
        e1 = ((w1*med) + w2*e1);
        e2 = ((w1*e1) + w2*e2);
        e3 = ((w1*e2) + w2*e3);
        e4 = ((w1*e3) + w2*e4);
        e5 = ((w1*e4) + w2*e5);
        e6 = ((w1*e5) + w2*e6);
    
        MapBuffer[i]=((((c1*e6) + c2*e5) + c3*e4) + c4*e3)*1000;

    }   
//----
   return(0);
  }
//+------------------------------------------------------------------+

Comments