sorry it's name is (( gaussian filter ))
is there's no one could help me ????
Hi, i am going to publish a few indicators with gaussian filtering.
Here is the basic filter:
//+------------------------------------------------------------------+ //| GFilter.mq4 | //| zzuegg | //| when-money-makes-money.com | //+------------------------------------------------------------------+ #property copyright "zzuegg" #property link "when-money-makes-money.com" #property indicator_chart_window #property indicator_buffers 5 #property indicator_color1 Yellow #property indicator_color2 DodgerBlue #property indicator_color3 Tomato #property indicator_color4 Blue #property indicator_color5 Red //---- buffers double fil[]; double fil.u[]; double fil.d[]; double fil.f.u[]; double fil.f.d[]; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ double pi = 3.1415926535; extern int FilterPeriod=12; double fil.alfa; double getAlfa(int p){ double w = 2*pi/p; double beta = (1 - MathCos(w))/(MathPow(1.414,2.0/3) - 1); double alfa = -beta + MathSqrt(beta*beta + 2*beta); return (alfa); } int init() { //---- indicators SetIndexStyle(0,DRAW_LINE); SetIndexBuffer(0,fil); SetIndexStyle(1,DRAW_LINE,STYLE_SOLID,1); SetIndexBuffer(1,fil.u); SetIndexStyle(2,DRAW_LINE,STYLE_SOLID,1); SetIndexBuffer(2,fil.d); SetIndexStyle(3,DRAW_ARROW); SetIndexArrow(3,159); SetIndexBuffer(3,fil.f.u); SetIndexEmptyValue(3,0.0); SetIndexStyle(4,DRAW_ARROW); SetIndexArrow(4,159); SetIndexBuffer(4,fil.f.d); SetIndexEmptyValue(4,0.0); fil.alfa=getAlfa(FilterPeriod); //---- return(0); } //+------------------------------------------------------------------+ //| Custom indicator deinitialization function | //+------------------------------------------------------------------+ int deinit() { //---- //---- return(0); } //+------------------------------------------------------------------+ //| Custom indicator iteration function | //+------------------------------------------------------------------+ double GSMOOTH(double price,double arr[],double alfa,int i){ double ret = MathPow(alfa,4)*price + 4*(1-alfa)*arr[i+1] - 6*MathPow(1-alfa,2)*arr[i+2] + 4*MathPow(1-alfa,3)*arr[i+3] - MathPow(1-alfa,4)*arr[i+4]; return (ret); } int start() { int counted_bars=IndicatorCounted(); //---- for(int i=Bars-counted_bars-1;i>=0;i--){ fil[i]=GSMOOTH(Close[i+1],fil,fil.alfa,i); if(fil[i]>fil[i+1]){ fil.u[i]=fil[i]; fil.u[i+1]=fil[i+1]; } if(fil[i]<fil[i+1]){ fil.d[i]=fil[i]; fil.d[i+1]=fil[i+1]; } double s2=fil[i+2]-fil[i+1]; double s1=fil[i+1]-fil[i]; if(s1<s2){ fil.f.u[i]=fil[i]; } if(s1>s2){ fil.f.d[i]=fil[i]; } } //---- return(0); } //+------------------------------------------------------------------+
can you but it please in the form of an indicator
and can you till me please what is it's importance and value
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
hello every one
i'm enterested in mostafa belkhyate
and i hear that he is using center of gravity and the timing indicator
recently i dicoverd that he was using something called (( gausian filter )))
can any one help me and bring me this (( gausian filter )) and tell me please how it work