GBPUSD_60_FATL

Download script
Author: Copyright (c) 2005, Sergey Iljukhin, Novosibirsk
GBPUSD_60_FATL

This technical tool is designed to function as a sophisticated "noise filter" for financial charts. In the world of trading, price action often contains "market noise"—small, rapid fluctuations that can obscure the broader trend. This script uses a specific type of digital signal processing (specifically a Digital Low Pass Filter) to smooth out these erratic movements, providing a cleaner view of the underlying price direction.

Core Logic and Functionality

1. Data Smoothing (Low Pass Filtering) The primary purpose of this script is "low-pass" filtering. Imagine water flowing through a sieve; the large objects move forward while the small particles are caught behind. In trading terms, the script allows the significant, high-momentum price trends to pass through while filtering out the minor, insignificant "vibrations" in the data. This helps traders identify more stable support and resistance levels or trend shifts that might be hidden by volatility.

2. Weighted Historical Analysis Rather than looking at the current price in isolation (which is often erratic) or using a simple moving average (which can be slow to react), this script employs a complex weighted calculation. It analyzes a specific window of the previous 60 bars of price data. Each bar in that sequence is assigned a unique numerical weight—some positive, some negative—based on a mathematical model designed to balance responsiveness with smoothness.

3. Mathematical Precision The logic operates by calculating a "response" value for every point on your chart. It achieves this by multiplying the closing price of 60 consecutive bars by very precise coefficients. By combining these values, the script generates a filtered line that follows the price movement more gracefully than standard indicators.

Key Features for the User

  • Reduced Lag: Because the formula is mathematically optimized (based on specific digital filter types like FATL/SATL), it aims to provide a smoother line without the significant "delay" or "lag" often found in traditional moving averages.
  • Visual Clarity: The output is rendered as a red line on your chart window. This provides a secondary, refined price path that helps confirm whether a trend is truly forming or if the current market movement is just temporary noise.
  • Stability: The script requires a minimum amount of historical data (60 bars) to begin its calculations, ensuring that the initial values are grounded in sufficient context before appearing on your screen.

In summary, this script serves as a professional-grade visual "stabilizer." It translates complex signal processing math into a simple, readable line that helps traders separate the signals from the noise.

Miscellaneous
Implements a curve of type %1
10 Views
0 Downloads
0 Favorites
GBPUSD_60_FATL
//+------------------------------------------------------------------+
//|                        Digital Low Pass (FATL/SATL, KGLP) Filter |
//|                      Copyright (c) Sergey Iljukhin, Novosibirsk. |
//|                       email sergey[at]tibet.ru http://fx.qrz.ru/ |
//+------------------------------------------------------------------+
#property copyright "Copyright (c) 2005, Sergey Iljukhin, Novosibirsk"
#property link      "http://fx.qrz.ru/"

// --- Parameters: P1=20, D1=15, A1=40
// --- P2=52, D2=31, A2=40, Ripple=0.08, Delay=0
// --- Order [Auto]=60, Calculate method=2

#property indicator_chart_window
#property indicator_buffers 1
#property indicator_color1 Red

//---- buffers
double FilterBuffer[];

//+------------------------------------------------------------------+
//| Digital filter indicator initialization function                 |
//+------------------------------------------------------------------+
int init()
{
string short_name;
//---- indicator line
SetIndexStyle(0,DRAW_LINE);
SetIndexBuffer(0,FilterBuffer);
SetIndexDrawBegin(0,60);
//----
return(0);
}
//+------------------------------------------------------------------+
//| Digital filter main function                                     |
//+------------------------------------------------------------------+
int start()
{
int i,counted_bars=IndicatorCounted();
double response;
//----
if(Bars<=60) return(0);
//---- initial zero
if(counted_bars<60)
for(i=1;i<=0;i++) FilterBuffer[Bars-i]=0.0;
//----
i=Bars-60-1;
if(counted_bars>=60) i=Bars-counted_bars-1;
while(i>=0)
{
response=
 0.2293323462290*Close[i+0]
 +0.2190511774408*Close[i+1]
 +0.1993338024147*Close[i+2]
 +0.1717839272009*Close[i+3]
 +0.1386151049464*Close[i+4]
 +0.1024156042123*Close[i+5]
 +0.0659166494902*Close[i+6]
 +0.0317217378766*Close[i+7]
 +0.002079470071233*Close[i+8]
 -0.02130792789267*Close[i+9]
 -0.0374268275447*Close[i+10]
 -0.0459936283555*Close[i+11]
 -0.0474259365311*Close[i+12]
 -0.0427588576676*Close[i+13]
 -0.0334977083382*Close[i+14]
 -0.02140608423347*Close[i+15]
 -0.00831222363772*Close[i+16]
 +0.00407036177848*Close[i+17]
 +0.01434938362745*Close[i+18]
 +0.02153142648075*Close[i+19]
 +0.02512154466442*Close[i+20]
 +0.02510327738679*Close[i+21]
 +0.02189857806786*Close[i+22]
 +0.01627002586538*Close[i+23]
 +0.00919219607002*Close[i+24]
 +0.001715283739057*Close[i+25]
 -0.00517798268754*Close[i+26]
 -0.01067498610433*Close[i+27]
 -0.01422638532721*Close[i+28]
 -0.01558683320084*Close[i+29]
 -0.01481246860304*Close[i+30]
 -0.01222431739350*Close[i+31]
 -0.00833254540991*Close[i+32]
 -0.00376393232851*Close[i+33]
 +0.000817306374321*Close[i+34]
 +0.00481007826645*Close[i+35]
 +0.00777795365965*Close[i+36]
 +0.00945330021850*Close[i+37]
 +0.00971329124828*Close[i+38]
 +0.00871792340730*Close[i+39]
 +0.00669388219623*Close[i+40]
 +0.00402693885178*Close[i+41]
 +0.001124223165593*Close[i+42]
 -0.001611047082491*Close[i+43]
 -0.00384067886774*Close[i+44]
 -0.00532970462554*Close[i+45]
 -0.00596390011682*Close[i+46]
 -0.00575534582940*Close[i+47]
 -0.00482122830067*Close[i+48]
 -0.00336352013268*Close[i+49]
 -0.001628348582629*Close[i+50]
 +0.0001363259868462*Close[i+51]
 +0.001712878999932*Close[i+52]
 +0.002950623420766*Close[i+53]
 +0.00378692903128*Close[i+54]
 +0.00427038044820*Close[i+55]
 +0.00458163321886*Close[i+56]
 +0.00507077382485*Close[i+57]
 +0.00632942992793*Close[i+58]
 -0.00623335101520*Close[i+59];
FilterBuffer[i]=response;

i--;
}
return(0);
}

Comments