[MT4指标]发个有用的指标供高手做
能吧分析家dkx指标弄成mt4的吗
a:=(3*c+l+o+h)/6;
b20 *a+19*ref(a,1)+18*ref(a,2)+17*ref(a,3)+16*ref(a,4)+15*ref(a,5)+14*ref(a,6)
+13*ref(a,7)+12*ref(a,8)+11*ref(a,9)+10*ref(a,10)+9*ref(a,11)+8*ref(a,12)
+7*ref(a,13)+6*ref(a,14)+5*ref(a,15)+4*ref(a,16)+3*ref(a,17)+2*ref(a,18)+
ref(a,20))/210;
d:ma(b,m);
m 缺省10 最小 1 最大 250步长 1
:) 请高手把它编mt4好吗:victory:
2楼
这指标的作用我认为就象把尺子,只是我用来度量的,具体的交易经验是通过多年的实战磨出来的,其实没啥的,只不过这是我多年看盘用惯了的一把尺子.没它真不习惯,真的感谢你把它在此平台上做出来了.
韬客社区www.talkfx.co
发表于:2008-04-27 07:55只看该作者
3楼
写指标是小技巧,实战考验过的理论才是大技巧,搂主能向大伙儿不吝赐教您的经验吗?
//+------------------------------------------------------------------+
//| DKX.mq4 |
//| Snowman |
//| http://www.metaquotes.net |
//+------------------------------------------------------------------+
#property copyright "Snowman"
#property link "http://www.metaquotes.net"
#property indicator_chart_window
#property indicator_buffers 3
#property indicator_color1 Tan
#property indicator_color2 LightBlue
#property indicator_color3 RoyalBlue
//---- input parameters
extern int iMaPeriod = 10;
extern int iSep = 30;
//---- buffers
double iMBuffer;
double iDKXBuffer;
double iMaBuffer;
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
//---- indicators
SetIndexStyle(0,DRAW_LINE);
SetIndexStyle(1,DRAW_LINE);
IndicatorDigits(Digits+1);
SetIndexStyle(2,DRAW_LINE);
//SetIndexDrawBegin(0,iSep);
//SetIndexDrawBegin(1,iSep);
//SetIndexDrawBegin(2,iSep);
SetIndexBuffer(0,iMBuffer);
SetIndexBuffer(1,iDKXBuffer);
SetIndexBuffer(2,iMaBuffer);
IndicatorShortName("DKX("+iMaPeriod+")");
SetIndexLabel(0,"MID");
SetIndexLabel(1,"DKX");
SetIndexLabel(2,"DKXMa");
//----
//Print("DKX inialized");
return(0);
}
//+------------------------------------------------------------------+
//| Custor indicator deinitialization function |
//+------------------------------------------------------------------+
int deinit()
{
//---- TODO: add your code here
//Print("DKX destroyed");
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
int start()
{
int limit;
double sum = 0;
int counted_bars=IndicatorCounted();
//---- check for possible errors
if(counted_bars<0 ) return(-1);
//---- last counted bar will be recounted
if(counted_bars>0) counted_bars--;
limit=Bars-counted_bars;
/*
1.MID=(3*收盘价+最低价+开盘价+最高价)/6
iABuffer
2.DKX=(20*MID+19*昨日MID+18*2日前的MID+17*3日前的MID+16*4日前的MID+15*5日前的MID+14*6日
前的MID+13*7日前的MID+12*8日前的MID+11*9日前的MID+10*10日前的MID+9*11日前的MID+8*12日前的
MID+7*13日前的MID+6*14日前的MID+5*15日前的MID+4*16日前的MID+3*17日前的MID+2*18日前的MID+1*20
日前的MID)/210
iBBuffer
3.MADKX=DKX的M日简单移动平均
iMaBbuffer
*/
//---- MID
for(int i=0; i
韬客社区www.talkfx.co
发表于:2008-04-27 09:04只看该作者
5楼
//+------------------------------------------------------------------+
//| DKX.mq4 |
//| Snowman |
//| http://www.metaquotes.net |
//+------------------------------------------------------------------+
#property copyright "Snowman"
#property link "http://www.metaquotes.net"
#property indicator_chart_window
#property indicator_buffers 3
#property indicator_color1 Tan
#property indicator_color2 LightBlue
#property indicator_color3 RoyalBlue
//---- input parameters
extern int iMaPeriod = 10;
extern int iSep = 30;
//---- buffers
double iMBuffer;
double iDKXBuffer;
double iMaBuffer;
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
//---- indicators
SetIndexStyle(0,DRAW_LINE);
SetIndexStyle(1,DRAW_LINE);
IndicatorDigits(Digits+1);
SetIndexStyle(2,DRAW_LINE);
//SetIndexDrawBegin(0,iSep);
//SetIndexDrawBegin(1,iSep);
//SetIndexDrawBegin(2,iSep);
SetIndexBuffer(0,iMBuffer);
SetIndexBuffer(1,iDKXBuffer);
SetIndexBuffer(2,iMaBuffer);
IndicatorShortName("DKX("+iMaPeriod+")");
SetIndexLabel(0,"MID");
SetIndexLabel(1,"DKX");
SetIndexLabel(2,"DKXMa");
//----
//Print("DKX inialized");
return(0);
}
//+------------------------------------------------------------------+
//| Custor indicator deinitialization function |
//+------------------------------------------------------------------+
int deinit()
{
//---- TODO: add your code here
//Print("DKX destroyed");
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
int start()
{
int limit;
double sum = 0;
int counted_bars=IndicatorCounted();
//---- check for possible errors
if(counted_bars<0 ) return(-1);
//---- last counted bar will be recounted
if(counted_bars>0) counted_bars--;
limit=Bars-counted_bars;
/*
1.MID=(3*收盘价+最低价+开盘价+最高价)/6
iABuffer
2.DKX=(20*MID+19*昨日MID+18*2日前的MID+17*3日前的MID+16*4日前的MID+15*5日前的MID+14*6日
前的MID+13*7日前的MID+12*8日前的MID+11*9日前的MID+10*10日前的MID+9*11日前的MID+8*12日前的
MID+7*13日前的MID+6*14日前的MID+5*15日前的MID+4*16日前的MID+3*17日前的MID+2*18日前的MID+1*20
日前的MID)/210
iBBuffer
3.MADKX=DKX的M日简单移动平均
iMaBbuffer
*/
//---- MID
for(int i=0; i
韬客社区www.talkfx.co
6楼
非常感谢雪天,
韬客社区www.talkfx.co