以下是通达信【攻防线主图】指标公式(无源码的请下载附件导入)
均线1:=MA(CLOSE,10),LINETHICK0; {10-60九九归一}
均线3:=MA(CLOSE,30),LINETHICK1;
均线2:=MA(CLOSE,20),LINETHICK1;
均线6:=MA(CLOSE,60);
均线12:=MA(CLOSE,120),COLORBLUE,LINETHICK1;
均线九九归一84:=MA(CLOSE,84),LINETHICK1;
买线:EMA(CLOSE,2);
卖线:EMA(SLOPE(CLOSE,30)*20+CLOSE,51),LINETHICK1;
BU:=CROSS(买线,卖线*0.991);
SEL:=CROSS(卖线*1.009,买线);
DRAWTEXT (BU,LOW*0.988,'多 '),COLOR00FFFF,LINETHICK3;
DRAWTEXT(SEL,HIGH*1.012,'空 '),COLORFFFF00,LINETHICK3;
BU1:=CROSS(买线,卖线*0.999);
SEL1:=CROSS(卖线*1.001,买线);
DRAWTEXT (BU1,LOW*0.968,'B ---'),COLORFF00FF,LINETHICK3;
DRAWTEXT(SEL1,HIGH*1.032,'S ---'),COLOR00FF00,LINETHICK3;
STICKLINE(买线>=卖线,LOW,HIGH,0,0),COLORRED;{红色}
STICKLINE(买线>=卖线,CLOSE,OPEN,3,0),COLOR0000AA;
STICKLINE(买线>=卖线,CLOSE,OPEN,2,0),COLOR0000CC;
STICKLINE(买线<卖线,CLOSE,OPEN,3,0),COLORAAAA00;
STICKLINE(买线<卖线,CLOSE,OPEN,2,0),COLORBBBB00;
STICKLINE(买线<卖线,LOW,HIGH,0,0),COLORFFFF00;
STICKLINE(CROSS(买线,卖线*0.991),OPEN,CLOSE,2.35,0),COLORYELLOW;
STICKLINE(CROSS(卖线*1.009,买线),OPEN,CLOSE,2.35,0),COLORFF0000;
STICKLINE(CROSS(买线,卖线*0.999),OPEN,CLOSE,2.02,0),COLORYELLOW;
STICKLINE(CROSS(卖线*1.001,买线),OPEN,CLOSE,2.02,0),COLORFF0000;
714100949.jpg
|