ang____ãÆ_____┬Á

Download script
ang____ãÆ_____┬Á

This technical indicator is designed to provide traders with a sophisticated visual tool for analyzing price movements by identifying underlying trends and smoothing out market "noise." It achieves this by combining two distinct mathematical approaches: high-performance trend filtering and cyclical decomposition.

Core Logic Breakdown

1. Trend Smoothing (The Base Layer) The script begins by utilizing an advanced smoothed moving average (the T3 logic). Rather than simply looking at the most recent price, this layer filters out minor fluctuations to establish a cleaner representation of the asset's primary direction. It acts as the "foundation" upon which the rest of the analysis is built.

2. Deviation Mapping Once the smoothed trend is established, the tool calculates the "distance" between the actual market price and that smoothed trend. By measuring this gap (the difference between where the price is currently moving and where the trend says it should be), the script identifies the momentum and volatility of the current market environment.

3. Cyclical Pattern Recognition (Fourier Analysis) The most complex part of this script involves breaking down the price movements into periodic cycles. Instead of assuming a trend moves in a straight line, the logic treats price movement like a wave. It decomposes the price data into multiple frequencies to identify:

  • Repeating Patterns: Recognizing how often specific price swings occur over a set period (defined by the user's settings).
  • Harmonic Components: It calculates the "weights" of these waves to see which cycles are the most dominant in the current market.

4. Reconstruction and Visualization Finally, the script reconstructs a comprehensive visual output. It takes the original smoothed trend and adds back the mathematically calculated cyclical components. The resulting line provides a refined view of the price action that highlights the core rhythmic cycles of the market while maintaining the integrity of the overall trend.

Summary for the Trader

In practical terms, this script doesn't just show you where the price is; it attempts to "de-clutter" the chart. It filters out the random vibrations of the market to reveal the underlying periodic waves and long-term trends. By using these calculations, it helps traders see the "rhythm" of the price movement more clearly than a standard moving average would allow.

Miscellaneous
Implements a curve of type %1
12 Views
0 Downloads
0 Favorites
ang____ãÆ_____┬Á
#property  copyright "ANG3110@latchess.com"
//----------------------------------------
#property indicator_chart_window
#property indicator_buffers 1
#property indicator_color1 Yellow
//-------------------------------
#import "af_T3.ex4"
int   af_T3( int i,int pt3, double ct3);
//-------------------------------
extern int hrf = 2;
extern int hrT3 = 6;
extern int days = 1;
//-----------------------------------------
double ak[],bk[],fx[],w,ak0,ss,sc,sk,dfx[];
double pi=3.1415926535897932384626433832795;
int T,sm,k;
double t3[],ct3,dc[];
int pt3;
//==========================================
int init() {
    IndicatorBuffers(5);
    SetIndexStyle(0,DRAW_LINE); 
    SetIndexBuffer(0,fx);
    SetIndexBuffer(1,t3);
    SetIndexBuffer(2,ak);
    SetIndexBuffer(3,bk);
    SetIndexBuffer(4,dc);
//--------------------------
pt3=hrT3*60/Period();
T=days*1440/Period(); 
w=2*pi/T;     
k=T/(hrf*60/Period());
return(0); }
//***************************************************
int start() {
//-----------------
int n,i,cbi;
//------------------
cbi=Bars-IndicatorCounted()-2;
for(i=cbi; i>=0; i--) {
//---------------------
ct3=Close[i];
t3[i]=af_T3(i,pt3,ct3);
dc[i]=Close[i]-t3[i];
}
//-------------------------- 
ak0=0.0;
for (n=0; n<=k; n++) { sc=0.0; ss=0.0;  
for (i=0; i<=T-1; i++) {
if (n==0) ak0+=dc[i]; 
if (n!=0) {sc=sc+dc[i]*MathCos(n*i*w); ss=ss+dc[i]*MathSin(n*i*w);} }
ak[n]=sc*2/T; bk[n]=ss*2/T; }
ak0=ak0/T; 
//--------------------------
for (i=0; i<=T-1; i++) { sk=0.0;
for (n=1; n<=k; n++) {
sk=sk+ak[n]*MathCos(n*i*w)+bk[n]*MathSin(n*i*w);}
fx[i]=ak0+sk+t3[i];  
} 
//---------------------------
 return(0); }
//****************************************************

Comments