
等级: 新手上路
- 注册:
- 2022-10-17
- 曾用名:
|
延续前面的贴子:
https://www.weistock.com/bbs/forum.php?mod=viewthread&tid=11176&extra=
下面是老师指导的网格式交易指标,在此基础上我把交易思路、交易思路图示、交易规则、测试项目分别贴出来,希望老师继续给予教导,非常感谢!
VARIABLE:Line1:=0,line2:=0,line3:=0,line4:=0;
VARIABLE:mark:=0;
ma24:ma(c,m);
if (cross(l,ma24) and Line1=0) or (all(line1<>0 and line2=0,24)) then
BEGIN
Line1:=ma24+3*bc;
END
if H>Line1 and line2=0 and Line1<>0 then Line2:=Line1+2*bc;
if H>Line2 and line3=0 and Line2<>0 then Line3:=Line1+5*bc;
if H>line3 and line4=0 and Line3<>0 then Line4:=Line1+7*bc;
if cross(ma24,l) then
begin
line1:=0;
line2:=0;
line3:=0;
line4:=0;
end
TOP1:if(line1<>0 and Line1>ma24,line1,DRAWNULL),COLORWHITE;
TOP2:if(line2<>0 and line2>ma24,line2,DRAWNULL),COLORYELLOW;
TOP3:if(line3<>0 and line3>ma24,line3,DRAWNULL),COLORRED;
TOP4:if(line4<>0 and line4>ma24,line4,DRAWNULL),COLORGREEN;
//======================================================================
VARIABLE:Line11:=0,line12:=0,line13:=0;Line14:=0;
if (cross(ma24,h) and Line11=0) or (all(Line11<>0 and Line11=0,24)) then
BEGIN
Line11:=ma24-3*bc;
END
if c<Line11 and Line12=0 and Line11<>0 then Line12:=Line11-2*bc;
if c<Line12 and Line13=0 and Line12<>0 then Line13:=Line11-5*bc;
if c<Line13 and Line14=0 and Line13<>0 then Line14:=Line11-7*bc;
if cross(h,ma24) then
begin
Line11:=0;
Line12:=0;
Line13:=0;
Line14:=0;
end
Bot1:if(Line11<>0 and Line11<ma24,Line11,DRAWNULL),COLORWHITE;
Bot2:if(Line12<>0 and Line12<ma24,Line12,DRAWNULL),COLORYELLOW;
Bot3:if(Line13<>0 and Line13<ma24,Line13,DRAWNULL),COLORRED;
Bot4:if(Line14<>0 and line14<ma24,Line14,DRAWNULL),COLORGREEN;
|
|