
等级: 新手上路
- 注册:
- 2022-10-17
- 曾用名:
|

楼主 |
发表于 2022-12-21 16:54
|
显示全部楼层
老师,均线下破后的编程怎么修改,我下面的指标没体现出画线来。
VARIABLE:Line1:=0,line2:=0,line3:=0;
VARIABLE:mark:=0;
ma24:ma(c,24);
if (cross(h,ma24) and Line1=0) or (all(line1<>0 and line2=0,25)) then
BEGIN
Line1:=ma24+30;
END
if h>Line1 and line2=0 and Line1<>0 then Line2:=MA24+50;
if h>Line2 and line3=0 and Line2<>0 then Line3:=MA24+80;
if cross(ma24,h) then
begin
line1:=0;
line2:=0;
line3:=0;
end
TOP1:if(line1<>0 and line2=0,line1,DRAWNULL),COLORWHITE;
TOP2:if(line2<>0 and line3=0,line2,DRAWNULL),COLORYELLOW;
TOP3:if(line3<>0,line3,DRAWNULL),COLORYELLOW,COLORRED;
//////////===============================================
VARIABLE:Line4:=0,line5:=0,line6:=0;
VARIABLE:mark:=0;
if (cross(ma24,L) and Line4=0) or (all(line4<>0 and line5=0,25)) then
BEGIN
Line4:=ma24-30;
END
if L<Line4 and line5=0 and Line4<>0 then Line5:=MA24-60;
if L<Line5 and line6=0 and Line5<>0 then Line6:=MA24-90;
if cross(ma24,L) then
begin
line4:=0;
line5:=0;
line6:=0;
end
LOW1:if(line4<>0 and line5=0,line4,DRAWNULL),COLORWHITE;
LOW2:if(line5<>0 and line6=0,line5,DRAWNULL),COLORYELLOW;
LOW3:if(line6<>0,line6,DRAWNULL),COLORYELLOW,COLORRED;
补充内容 (2022-12-21 16:56):
就是同理画出均线下方的MA(C,24)-30-60-90三条线段 |
|