[MT4指标]Macd Div(指标源码)
/*[[
Name := MACDMYSIG(3bars)
Author := Dima
Link := http://www.viac.ru/
Separate Window := No
First Color := Blue
First Draw Type := Symbol
First Symbol := 202
Use Second Data := Yes
Second Color := Red
Second Draw Type := Symbol
Second Symbol := 200
]]*/
Variable : shift(0),MACDH(0),MACDL(0),priceh(0),pricel(0),k(0),count(0),z(0);
SetLoopCount(0);
// loop from first bar to current bar (with shift=0)
For shift=1 to 300 Begin
//镱桉?滂忮疣 磬 镳钿噫?
if iMACD(5,34,5,mode_main,shift)>0 and iMACD(5,34,5,mode_main,shift+1)>0 and iMACD(5,34,5,mode_main,shift+2)>0 and
iMACD(5,34,5,mode_main,shift)iMACD(5,34,5,mode_main,shift+2) then
Begin
MACDH=iMACD(5,34,5,mode_main,shift+1);
priceh=Close[shift+1];
if priceh0 and iMACD(5,34,5,mode_main,count+1)>0
and iMACD(5,34,5,mode_main,count+2)>0 and
iMACD(5,34,5,mode_main,count)iMACD(5,34,5,mode_main,count+2) and MACDH=Close[count+1] and priceh>=Close[count+2] and priceh>=Close[count+3]
and z<=iMACD(5,34,5,mode_main,count+1)
then SetIndexValue(shift,priceh+0.0030);
if ziMACD(5,34,5,mode_main,shift+1) and
iMACD(5,34,5,mode_main,shift+1)close[shift+2] then pricel=close [shift+2];
if pricel>close[shift+3] then pricel=close [shift+3];
k=shift;z=0;
For count=k+2 to k+60
Begin
if iMACD(5,34,5,mode_main,count)<0 and iMACD(5,34,5,mode_main,count+1)<0
and iMACD(5,34,5,mode_main,count+2)<0 and
iMACD(5,34,5,mode_main,count)>iMACD(5,34,5,mode_main,count+1) and
iMACD(5,34,5,mode_main,count+1)iMACD(5,34,5,mode_main,count+1)
and pricel<=Close[count+1] and pricel<=Close[count+2]and pricel<=Close[count+3] and
z>=iMACD(5,34,5,mode_main,count+1)
then SetIndexValue2(shift,pricel-0.0030);
if z>iMACD(5,34,5,mode_main,count) then z=iMACD(5,34,5,mode_main,count);
end;
end;
End;
m.gif

发表于:2005-07-08 14:23只看该作者
2楼
谢谢!加入到指标里边了,就是显示不出来?
韬客社区www.talkfx.co
发表于:2005-07-09 03:40只看该作者
3楼
能不能上传一个啊~~~~
韬客社区www.talkfx.co
发表于:2005-07-10 00:35只看该作者
4楼
原来是用于MT3的,搞定了,谢谢
韬客社区www.talkfx.co