买卖图比MACD早3—5天的买卖主图通达信公式 副图 源码附图
DD:=C;实时:REFDATE(DD,DATE),DOTLINE,COLORMAGENTA,LINETHICK1;
ZDT:=(C-REF(C,1))/REF(C,1)*100;
STICKLINE(ZDT>9.8,O,C,3,0),COLORMAGENTA;
STICKLINE(ZDT<-9.8,O,C,2,0),COLOR00FF00;
{股票指标网 整理}
VAR31:=LLV(HIGH,240);
VAR41:=100*(CLOSE-VAR31)/VAR31;
VAR51:=(CLOSE-LLV(LOW,528))/(HHV(HIGH,528)-LLV(LOW,528))*100;
VAR61:=(CLOSE-LLV(CLOSE,530))/(HHV(CLOSE,530)-LLV(CLOSE,530))*100;
VAR71:=0;
VAR81:=SMA(MAX(CLOSE-REF(CLOSE,1),0),34,1)/SMA(ABS(CLOSE-REF(CLOSE,1)),7,1)*100;
VAR91:=SMA(MAX(CLOSE-REF(CLOSE,1),0),13,1)/SMA(ABS(CLOSE-REF(CLOSE,1)),13,1)*100;
VARA1:=BARSCOUNT(CLOSE);
VARB1:=VAR81<20 AND VAR91<23 AND VARA1>35;
VARC1:=VARB1 AND COUNT(VARB1,1)=1;
VARD1:=EMA(CLOSE,21)-EMA(CLOSE,8);
VARE1:=EMA(VARD1,5);
VARF1:=TROUGHBARS(3,6,1)<4 AND CROSS(VARD1,VARE1);
VAR101:=IF(TROUGHBARS(3,16,1)=0 AND HIGH>LOW+0.04,4,0);
VAR111:=ZIG(3,6)>REF(ZIG(3,6),1) AND REF(ZIG(3,6),1)<=REF(ZIG(3,6),2) AND REF(ZIG(3,6),2)<=REF(ZIG(3,6),3);
VAR121:=ZIG(3,6)=REF(ZIG(3,6),2) AND REF(ZIG(3,6),2)>=REF(ZIG(3,6),3);
VAR131:=ZIG(3,22)>REF(ZIG(3,22),1) AND REF(ZIG(3,22),1)<=REF(ZIG(3,22),2) AND REF(ZIG(3,22),2)<=REF(ZIG(3,22),3);
VAR141:=ZIG(3,22)=REF(ZIG(3,22),2) AND REF(ZIG(3,22),2)>=REF(ZIG(3,22),3);
VAR151:=ZIG(3,51)>REF(ZIG(3,51),1) AND REF(ZIG(3,51),1)<=REF(ZIG(3,51),2) AND REF(ZIG(3,51),2)<=REF(ZIG(3,51),3);
VAR161:=ZIG(3,51)=REF(ZIG(3,51),2) AND REF(ZIG(3,51),2)>=REF(ZIG(3,51),3);
VAR171:=ZIG(3,72)>REF(ZIG(3,72),1) AND REF(ZIG(3,72),1)<=REF(ZIG(3,72),2) AND REF(ZIG(3,72),2)<=REF(ZIG(3,72),3);
VAR181:=ZIG(3,72)=REF(ZIG(3,72),2) AND REF(ZIG(3,72),2)>=REF(ZIG(3,72),3);
VAR191:=EMA(CLOSE,2)-EMA(CLOSE,150);
VAR1A1:=EMA(VAR191,100);
VAR1B:=2*(VAR191-VAR1A1);
VAR1C:=POW(VAR1B,3)*0.1+POW(VAR1B,1);
VAR1D:=SQRT(SQRT(LOW*HIGH*OPEN*CLOSE));
VAR1E:=EMA(VAR1D*0.97,3);
VAR1F:=(HIGH+LOW+CLOSE)/3;
VAR20:=(VAR1F-MA(VAR1F,14))/(0.015*AVEDEV(VAR1F,14));
VAR21:=CROSS(VAR1E,LOW);
买点1:=VAR101;
买点B:=(VAR111+VAR131+VAR151+VAR171);
卖点1:=(VAR121+VAR141+VAR161+VAR181),LINETHICK2;
VAR22:=买点1 AND VARF1 AND VARC1 AND VAR21 AND VAR41<0 AND VAR51=0 AND
VAR61=0 AND VAR20<(-110);
VAR1:=MA(CLOSE,5);
VAR2:=MA(CLOSE,10);
VAR3:=MA(CLOSE,30);
VAR4:=MA(CLOSE,60);
VAR5:=EMA(COST(85),7);
VAR6:=EMA(COST(15),7);
VAR7:=SUM(CLOSE*VOL*100,4)/SUM(VOL*100,4);
VAR8:=INTPART(VAR7*100)/100;
VAR9:=SUM(CLOSE*VOL*100,7)/SUM(VOL*100,7);
VARA:=INTPART(VAR9*100)/100;
VARB:=SUM(CLOSE*VOL*100,28)/SUM(VOL*100,28);
VARC:=INTPART(VARB*100)/100;
VARD:=EMA(CLOSE,5)-EMA(CLOSE,10);
VARE:=EMA(VARD,9);
VARF:=(-100)*(HHV(CLOSE,5)-CLOSE)/(HHV(CLOSE,5)-LLV(LOW,5))+100;
VAR10:=(-100)*(HHV(CLOSE,10)-CLOSE)/(HHV(CLOSE,10)-LLV(LOW,10))+100;
VAR11:=(-100)*(HHV(CLOSE,20)-CLOSE)/(HHV(CLOSE,20)-LLV(LOW,20))+100;
VAR12:=(-100)*(HHV(CLOSE,30)-CLOSE)/(HHV(CLOSE,30)-LLV(LOW,30))+100;
VAR13:=REF(VARE,1);
VAR14:=VARE;
VAR15:=VAR14-VAR13;
VAR16:=REF(VARD,1);
VAR17:=VARD;
VAR18:=VAR17-VAR16;
VAR19:=OPEN;
VAR1A:=CLOSE;
买点3:=IF(VAR19<=VAR1 AND VAR19<=VAR2 AND VAR19<=VAR3 AND VAR1A>=VAR1 AND VAR1A>=VARC
AND VAR15>0 AND VAR18>0,0.5,0);
DRAWICON(买点3>0,LOW-0.01,1);
DRAWTEXT(买点1>0,LOW-0.01,'*买点A'),COLORCYAN;
DRAWTEXT(买点B>0,LOW-0.01,'*B买点'),COLORYELLOW;
{DRAWTEXT(卖点1>0,HIGH+0.1,'*卖点1'),COLORCYAN};
{看牛骑牛主图}
天使:=EMA(C,2);
魔鬼:=EMA(SLOPE(C,9)*20+C,40);
买5:=CROSS(天使,魔鬼);
DRAWTEXT (买5,LOW*0.97,'牛'),COLORMAGENTA;
STICKLINE(CROSS(天使,魔鬼),OPEN,CLOSE,2,0),COLORYELLOW;
未来函数检测结果如下:
该公式包含未来函数:ZIG
该公式包含未来函数:TROUGH
该公式包含未来函数:TROUGHBARS
该公式包含未来函数:COST
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
DD赋值:C
输出实时:REFDATE(DD,DATE),DOTLINE,画洋红色,LINETHICK1
ZDT赋值:(C-1日前的C)/1日前的C*100
当满足条件ZDT>9.8时,在O和C之间画柱状线
当满足条件ZDT<-9.8时,在O和C之间画柱状线
{股票指标网 整理}
VAR31赋值:240日内最高价最低值
VAR41赋值:100*(收盘价-VAR31)/VAR31
VAR51赋值:(收盘价-528日内最低价最低值)/(528日内最高价最高值-528日内最低价最低值)*100
VAR61赋值:(收盘价-530日内收盘价最低值)/(530日内收盘价最高值-530日内收盘价最低值)*100
VAR71赋值:0
VAR81赋值:SMA(收盘价-1日前的收盘价和0较大值,34,1)/SMA(收盘价-1日前的收盘价的绝对值,7,1)*100
VAR91赋值:SMA(收盘价-1日前的收盘价和0较大值,13,1)/SMA(收盘价-1日前的收盘价的绝对值,13,1)*100
VARA1赋值:收盘价的有效数据周期数
VARB1赋值:VAR81<20 AND VAR91<23 AND VARA1>35
VARC1赋值:VARB1 AND 统计1日满足VARB1的天数=1
VARD1赋值:收盘价的21日指数移动平均-收盘价的8日指数移动平均
VARE1赋值:VARD1的5日指数移动平均
VARF1赋值:TROUGHBARS(3,6,1)<4 AND VARD1上穿VARE1
VAR101赋值:IF(TROUGHBARS(3,16,1)=0 AND 最高价>最低价+0.04,4,0)
VAR111赋值:ZIG(3,6)>REF(ZIG(3,6),1) AND REF(ZIG(3,6),1)<=REF(ZIG(3,6),2) AND REF(ZIG(3,6),2)<=REF(ZIG(3,6),3)
VAR121赋值:ZIG(3,6)=REF(ZIG(3,6),2) AND REF(ZIG(3,6),2)>=REF(ZIG(3,6),3)
VAR131赋值:ZIG(3,22)>REF(ZIG(3,22),1) AND REF(ZIG(3,22),1)<=REF(ZIG(3,22),2) AND REF(ZIG(3,22),2)<=REF(ZIG(3,22),3)
VAR141赋值:ZIG(3,22)=REF(ZIG(3,22),2) AND REF(ZIG(3,22),2)>=REF(ZIG(3,22),3)
VAR151赋值:ZIG(3,51)>REF(ZIG(3,51),1) AND REF(ZIG(3,51),1)<=REF(ZIG(3,51),2) AND REF(ZIG(3,51),2)<=REF(ZIG(3,51),3)
VAR161赋值:ZIG(3,51)=REF(ZIG(3,51),2) AND REF(ZIG(3,51),2)>=REF(ZIG(3,51),3)
VAR171赋值:ZIG(3,72)>REF(ZIG(3,72),1) AND REF(ZIG(3,72),1)<=REF(ZIG(3,72),2) AND REF(ZIG(3,72),2)<=REF(ZIG(3,72),3)
VAR181赋值:ZIG(3,72)=REF(ZIG(3,72),2) AND REF(ZIG(3,72),2)>=REF(ZIG(3,72),3)
VAR191赋值:收盘价的2日指数移动平均-收盘价的150日指数移动平均
VAR1A1赋值:VAR191的100日指数移动平均
VAR1B赋值:2*(VAR191-VAR1A1)
VAR1C赋值:POW(VAR1B,3)*0.1+POW(VAR1B,1)
VAR1D赋值:SQRT(SQRT(最低价*最高价*开盘价*收盘价))
VAR1E赋值:VAR1D*0.97的3日指数移动平均
VAR1F赋值:(最高价+最低价+收盘价)/3
VAR20赋值:(VAR1F-VAR1F的14日简单移动平均)/(0.015*AVEDEV(VAR1F,14))
VAR21赋值:VAR1E上穿最低价
买点1赋值:VAR101
买点B赋值:(VAR111+VAR131+VAR151+VAR171)
卖点1赋值:(VAR121+VAR141+VAR161+VAR181), 线宽为2
VAR22赋值:买点1 AND VARF1 AND VARC1 AND VAR21 AND VAR41<0 AND VAR51=0 AND
VAR61=0 AND VAR20<(-110)
VAR1赋值:收盘价的5日简单移动平均
VAR2赋值:收盘价的10日简单移动平均
VAR3赋值:收盘价的30日简单移动平均
VAR4赋值:收盘价的60日简单移动平均
VAR5赋值:EMA(获利盘为85%的成本分布,7)
VAR6赋值:EMA(获利盘为15%的成本分布,7)
VAR7赋值:4的收盘价*成交量*100日累和/4的成交量*100日累和
VAR8赋值:INTPART(VAR7*100)/100
VAR9赋值:7的收盘价*成交量*100日累和/7的成交量*100日累和
VARA赋值:INTPART(VAR9*100)/100
VARB赋值:28的收盘价*成交量*100日累和/28的成交量*100日累和
VARC赋值:INTPART(VARB*100)/100
VARD赋值:收盘价的5日指数移动平均-收盘价的10日指数移动平均
VARE赋值:VARD的9日指数移动平均
VARF赋值:(-100)*(5日内收盘价最高值-收盘价)/(5日内收盘价最高值-5日内最低价最低值)+100
VAR10:=(-100)*(10日内收盘价最高值-收盘价)/(10日内收盘价最高值-10日内最低价最低值)+100
VAR11:=(-100)*(20日内收盘价最高值-收盘价)/(20日内收盘价最高值-20日内最低价最低值)+100
VAR12:=(-100)*(30日内收盘价最高值-收盘价)/(30日内收盘价最高值-30日内最低价最低值)+100
VAR13:=1日前的VARE
VAR14:=VARE
VAR15:=VAR14-VAR13
VAR16:=1日前的VARD
VAR17:=VARD
VAR18:=VAR17-VAR16
VAR19:=开盘价
VAR1A:=收盘价
如果VAR19<=VAR1 AND VAR19<=VAR2 AND VAR19<=VAR3 AND VAR1A>=VAR1 AND VAR1A>=VARC
AND VAR15>0 AND VAR18>0返回0.5否则返回0
当满足条件买点3>0时,在最低价-0.01和1之间画图标
当满足条件买点1>0时,在最低价-0.01和'*买点A'位置书写文字
当满足条件买点B>0时,在最低价-0.01和'*B买点'位置书写文字
当满足条件卖点1>0时,在最高价+0.1和'*卖点1'位置书写文字
{看牛骑牛主图}
天使赋值:C的2日指数移动平均
魔鬼赋值:EMA(SLOPE(C,9)*20+C,40)
买5赋值:天使上穿魔鬼
DRAWTEXT (买5,最低价*0.97,'牛'),画洋红色
STICKLINE(天使上穿魔鬼,开盘价,收盘价,2,0),画黄色