一个点位指标工具
会用的很好用,可以自己研究一下下面是代码。//| CDP.mq4 |
//| Copyright ?2005,520FXCorp. |
//| http://www.520FX.com |
//+------------------------------------------------------------------+
#property copyright "Copyright, 520FX Corp."
#property link "http://www.520fx.com"
//+------------------------------------------------------------------+
//| expert start function |
//+------------------------------------------------------------------+
int start()
{
//----
double cdp,H,L,C,Hn,Ln;
double PT,AH,NH,AL,NL;
//----
H=iMA(NULL,0,1,0,MODE_SMA,PRICE_HIGH,1);
L=iMA(NULL,0,1,0,MODE_SMA,PRICE_LOW,1);
C=iMA(NULL,0,1,0,MODE_SMA,PRICE_CLOSE,1);
Hn=iMA(NULL,0,1,0,MODE_SMA,PRICE_HIGH,2);
Ln=iMA(NULL,0,1,0,MODE_SMA,PRICE_LOW,2);
cdp=(H+L+2*C)/4;
PT=Hn-Ln;
AH=cdp+PT;
NH=cdp*2-L;
AL=cdp-PT;
NL=cdp*2-H;
Comment("强支撑:",AL,"弱支撑:",NL,"弱阻力",NH,"强阻力",AH);
ObjectDelete("水平线");
ObjectDelete("水平线1");
ObjectDelete("水平线2");
ObjectDelete("水平线3");
ObjectCreate("水平线",OBJ_HLINE,0,D'2005.11.01 10:30',AL);
ObjectCreate("水平线1",OBJ_HLINE,0,D'2005.11.01 10:30',NL);
ObjectCreate("水平线2",OBJ_HLINE,0,D'2005.11.01 10:30',NH);
ObjectCreate("水平线3",OBJ_HLINE,0,D'2005.11.01 10:30',AH);
return(0);
}
顶下 {:1_186:} {:1_179:} {:1_179:} 顶下 顶下 {:1_179:} 顶下 谢谢