Author: Copyright 2002, Finware.ru Ltd.
FATL

This tool is a specialized technical indicator designed to help traders visualize specific price trends by smoothing out the "noise" of daily market fluctuations. Instead of simply looking at the most recent price, it provides a more stable perspective on where the market is heading by calculating a weighted average of historical data.

How it Works

The logic behind this script relies on a sophisticated mathematical formula that examines a specific window of past price points (specifically 39 historical data points). Rather than treating every piece of information as equal, the indicator assigns a different "weight" or importance level to each previous price:

  • Recent Importance: The most recent prices are given the highest weight, meaning they have a significant impact on where the current line appears.
  • Historical Context: As the formula looks further back into the past, the influence of those older prices gradually decreases.
  • Balanced Calculation: By using both positive and negative multipliers across these 39 points, the logic aims to identify the underlying momentum of the asset, effectively filtering out temporary spikes or dips that might mislead a trader looking only at the current price.

Visual Output

On your trading chart, this logic manifests as a smooth blue line. Because it takes into account a wide range of historical data relative to the current moment, the resulting line moves more fluidly than standard price candles. This allows traders to see the "big picture" of the market trend more clearly, helping to distinguish between a minor price fluctuation and a significant shift in direction.

Miscellaneous
Implements a curve of type %1
11 Views
0 Downloads
0 Favorites
FATL
//+------------------------------------------------------------------+
//| FATL.mq4 
//| Ramdass - Conversion only
//+------------------------------------------------------------------+
#property copyright "Copyright 2002, Finware.ru Ltd."
#property link "http://www.finware.ru/"

#property indicator_chart_window
#property indicator_buffers 1
#property indicator_color1 Blue

extern int CountBars=300;
//---- buffers
double FATLBuffer[];
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
  {
   string short_name;
//---- indicator line
   SetIndexStyle(0,DRAW_LINE);
   SetIndexBuffer(0,FATLBuffer);
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| FATL                                                             |
//+------------------------------------------------------------------+
int start()
  {
   SetIndexDrawBegin(0,Bars-CountBars+38);
   int i,counted_bars=IndicatorCounted();
//----
   if(Bars<=38) return(0);
//---- initial zero
   if(counted_bars<38)
      for(i=1;i<=0;i++) FATLBuffer[CountBars-i]=0.0;
//----
   i=CountBars-38-1;
//   if(counted_bars>=38) i=Bars-counted_bars-1;
   while(i>=0)
     {
      FATLBuffer[i]=
0.4360409450*Close[i+0]
+0.3658689069*Close[i+1]
+0.2460452079*Close[i+2]
+0.1104506886*Close[i+3]
-0.0054034585*Close[i+4]
-0.0760367731*Close[i+5]
-0.0933058722*Close[i+6]
-0.0670110374*Close[i+7]
-0.0190795053*Close[i+8]
+0.0259609206*Close[i+9]
+0.0502044896*Close[i+10]
+0.0477818607*Close[i+11]
+0.0249252327*Close[i+12]
-0.0047706151*Close[i+13]
-0.0272432537*Close[i+14]
-0.0338917071*Close[i+15]
-0.0244141482*Close[i+16]
-0.0055774838*Close[i+17]
+0.0128149838*Close[i+18]
+0.0226522218*Close[i+19]
+0.0208778257*Close[i+20]
+0.0100299086*Close[i+21]
-0.0036771622*Close[i+22]
-0.0136744850*Close[i+23]
-0.0160483392*Close[i+24]
-0.0108597376*Close[i+25]
-0.0016060704*Close[i+26]
+0.0069480557*Close[i+27]
+0.0110573605*Close[i+28]
+0.0095711419*Close[i+29]
+0.0040444064*Close[i+30]
-0.0023824623*Close[i+31]
-0.0067093714*Close[i+32]
-0.0072003400*Close[i+33]
-0.0047717710*Close[i+34]
+0.0005541115*Close[i+35]
+0.0007860160*Close[i+36]
+0.0130129076*Close[i+37]
+0.0040364019*Close[i+38];

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

Comments