#
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
Home
Forex Forum
+ Add Script
Metastock
Expert Advisors
Explorations
Indicators
Trading Systems
Metatrader
MQL Experts
MQL Indicators
MQ4 Experts
MQ4 Indicators
MQ4 Scripts
Tradestation
Functions
Indicators
PaintBars
ShowMe
Trading Systems
Amibroker
Commentaries
Explorations
Functions
Indicators
Trading Systems
Contact us
Newsletter
Group: Metatrader MQ4 Indicators
Title: Kaufman
Description:
Kaufman
//+------------------------------------------------------------------+ //| Kaufman.mq4 | //| Copyright © 2004, by konKop & wellx | //| http://www.metaquotes.net | //+------------------------------------------------------------------+ #property copyright "Copyright © 2004, by konKop, GOODMAN, Mstera, af + wellx" #property link "http://www.metaquotes.net" #property indicator_chart_window #property indicator_buffers 1 #property indicator_color1 Sienna //---- input parameters extern int periodAMA=9; extern int nfast=2; extern int nslow=30; extern int G=2; //---- buffers double kAMAbuffer[]; //+------------------------------------------------------------------+ int cbars=0; double slowSC,fastSC; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { //---- indicators SetIndexStyle(0,DRAW_LINE); //SetIndexDrawBegin(0,nslow+nfast); SetIndexBuffer(0,kAMAbuffer); IndicatorDigits(6); //slowSC=0.064516; //fastSC=0.2; cbars=IndicatorCounted(); //---- return(0); } //+------------------------------------------------------------------+ //| Custom indicator deinitialization function | //+------------------------------------------------------------------+ int deinit() { return(0); } //+------------------------------------------------------------------+ //| Custom indicator iteration function | //+------------------------------------------------------------------+ int start() { int i,pos=0; double noise,noise0,AMA,AMA0,signal,ER; double dSC,ERSC,wlxSSC; //---- TODO: add your code here slowSC=(2.0 /(nslow+1)); fastSC=(2.0 /(nfast+1)); if (Bars<=(periodAMA+2)) return(0); //---- check for possible errors if (cbars<0) return(-1); //---- last counted bar will be recounted if (cbars>0) cbars--; pos=Bars-periodAMA-2; //pos=100; //Print("cbars1: ", cbars); AMA0=Close[pos+1]; while (pos>=0) { if(pos==Bars-periodAMA-2) AMA0=Close[pos+1]; signal=MathAbs(Close[pos]-Close[pos+periodAMA]); noise=0; for(i=0;i
Author/Source:
konKop & wellx
Forex Directory
|
Free Forex Strategies
|
Forex Trading Systems
|
Privacy
|
Disclaimer
|
Contact