//+------------------------------------------------------------------+ //| This filter created by Digital filter Method | //| Software(Copyright (c) Sergey Iljukhin, Novosibirsk. | //| email sergey[at]tibet.ru http://fx.qrz.ru/). | //| Designing and special parameters are designed and | //| tested to remove more noise and follow the price | //| instantly and reliably. This source code is free. | //| Designer: Saeid Mohammadi Jazi, saeid169@yahoo.com| //+------------------------------------------------------------------+ #property copyright "Copyright (c) 2005, Sergey Iljukhin, Novosibirsk" #property link "http://fx.qrz.ru/" // --- Parameters: P1=20, D1=12, A1=40 // --- P2=36, D2=12, A2=40, Ripple=0.08, Delay=0 // --- Order [Auto]=30, Calculate method=2 #property indicator_chart_window #property indicator_buffers 1 #property indicator_color1 Red #define FilterOrder 30 //---- buffers double FilterBuffer[]; //+------------------------------------------------------------------+ //| Digital filter indicator initialization function | //+------------------------------------------------------------------+ int init() { //---- indicator line SetIndexStyle(0,DRAW_LINE); SetIndexBuffer(0,FilterBuffer); SetIndexDrawBegin(0,30); //---- return(0); } //+------------------------------------------------------------------+ //| Digital filter main function | //+------------------------------------------------------------------+ int start() { int i,counted_bars=IndicatorCounted(); double response; //---- if(Bars<=30) return(0); //---- i=Bars-30-1; if(counted_bars>=30) i=Bars-counted_bars-1; while(i>=0) { response= 0.2674159617898*Close[i] +0.2513802565774*Close[i+1] +0.2211333753570*Close[i+2] +0.1800616410930*Close[i+3] +0.1326480423408*Close[i+4] +0.0838587718677*Close[i+5] +0.0384533194950*Close[i+6] +0.000361380408010*Close[i+7] -0.02763961135328*Close[i+8] -0.0443785558740*Close[i+9] -0.0501417866008*Close[i+10] -0.0465638452107*Close[i+11] -0.0362043470551*Close[i+12] -0.02209069455035*Close[i+13] -0.00720956629679*Close[i+14] +0.00589037910713*Close[i+15] +0.01544079199829*Close[i+16] +0.02055957526714*Close[i+17] +0.02126036163880*Close[i+18] +0.01828930006698*Close[i+19] +0.01286478623414*Close[i+20] +0.00638761812864*Close[i+21] +0.0001646100607892*Close[i+22] -0.00480278407473*Close[i+23] -0.00796418634567*Close[i+24] -0.00925425730208*Close[i+25] -0.00909425465110*Close[i+26] -0.00839501788430*Close[i+27] -0.00872393363958*Close[i+28] +0.00629266940806*Close[i+29]; FilterBuffer[i]=response; i--; } return(0); }
Sample
Analysis
Market Information Used:
Series array that contains close prices for each bar
Indicator Curves created:
Implements a curve of type DRAW_LINE
Indicators Used:
Custom Indicators Used:
Order Management characteristics:
Other Features: