波动预警A通达信公式 副图 源码附图
X_1:=DYNAINFO(11);
X_2:=DYNAINFO(17);
X_3:=(COUNT(CLOSE>0,FROMOPEN)-1-MOD(COUNT(CLOSE>0,FROMOPEN)-1,10))/10+1;
X_4:=EMA(LOG(SMA(SUM(DYNAINFO(37),FROMOPEN)*2400000/X_3,3,1)),240);
X_5:=(CLOSE/DYNAINFO(11)-(MA(CLOSE/DYNAINFO(11),55)+MA(CLOSE/DYNAINFO(11),21)+MA(CLOSE/DYNAINFO(11),34))/3)/MA(CLOSE/DYNAINFO(11),3)*1200;
X_6:=2*((EMA(CLOSE,12)-EMA(CLOSE,26))*600/DYNAINFO(11)-EMA((EMA(CLOSE,12)-EMA(CLOSE,26))*600/DYNAINFO(11),9))*10;
X_7:=SUM(AMOUNT,40)/(AMOUNT/VOL/100)/100;
X_8:=SUM(AMOUNT,80)/(AMOUNT/VOL/100)/100;
X_9:=(CLOSE-DMA((3*HIGH+LOW+OPEN+2*CLOSE)/7,VOL/X_7))/DMA((3*HIGH+LOW+OPEN+2*CLOSE)/7,VOL/X_7)*(9000/X_4);
X_10:=(CLOSE-DMA((3*HIGH+LOW+OPEN+2*CLOSE)/7,VOL/X_8))/DMA((3*HIGH+LOW+OPEN+2*CLOSE)/7,VOL/X_8)*(9000/X_4);
X_11:=3*SMA((CLOSE-LLV(LOW,55))/(HHV(HIGH,55)-LLV(LOW,55))*100,5,1)-2*SMA(SMA((CLOSE-LLV(LOW,55))/(HHV(HIGH,55)-LLV(LOW,55))*100,5,1),3,1);
X_12:=IF(X_10>0,X_10-100,(-100));
X_13:=IF(X_10<0,X_10+100,100);
X_14:=IF(X_9>0,X_9-100,(-100));
X_15:=IF(X_9<0,X_9+100,100);
X_16:=EMA((-100)*(HHV(HIGH,34)-CLOSE)/(HHV(HIGH,34)-LLV(LOW,34)),3);
X_17:=EMA(100-3*SMA((LLV(LOW,75)-CLOSE)/(HHV(HIGH,75)-LLV(LOW,75))*100,18,1)+2*SMA(SMA((LLV(LOW,75)-CLOSE)/(HHV(HIGH,75)-LLV(LOW,75))*100,18,1),15,1)-100,3);
X_18:=100*(HHV(HIGH,55)-CLOSE)/(HHV(HIGH,55)-LLV(CLOSE,55));
X_19:=(EXPMA(CLOSE,500)-REF(EXPMA(CLOSE,500),1))/REF(EXPMA(CLOSE,500),1)*61800;
X_20:=(X_16+X_17-X_18+50)/135;
必卖:IF(X_20>0.8,X_20,DRAWNULL),NODRAW,COLORRED;
必买:IF(X_20<(-0.8),-X_20,DRAWNULL),NODRAW,COLORGREEN;
危险:IF(0<=X_20 AND X_20<=0.8,X_20,DRAWNULL),NODRAW,COLORYELLOW;
机遇:IF(X_20>(-0.8) AND X_20<0,-X_20,DRAWNULL),NODRAW,COLORBLUE;
卖:IF(CLOSE>COST(86),COST(95),DRAWNULL),NODRAW,COLORLIRED;
买:IF(CLOSE<COST(14),COST(5),DRAWNULL),NODRAW,COLORLIGREEN;
点:IF(X_19<(-1.2) OR X_19>1.2,X_19*0.382,DRAWNULL),NODRAW,COLORLIBLUE;
趋势:(X_17*2-100)/1.2,COLORWHITE;
X_21:=((CLOSE/(SUM(VOL*CLOSE,FROMOPEN)/SUM(VOL,FROMOPEN))-1)*61.799999+(CLOSE/(SUM(VOL*CLOSE,0)/SUM(VOL,0))-1)*38.200001)*((CLOSE/X_1-1)*68.199997+(CLOSE/EMA(CLOSE,480)-1)*38.200001);
IF(X_21>0.618 AND CLOSE>X_1,SQRT(X_21)*19.1-100,(-100)),COLORCYAN,LINETHICK2;
IF(X_21>0.618 AND CLOSE<X_1,100-SQRT(X_21)*19.1,100),COLORMAGENTA,LINETHICK2;
X_22:=(COUNT(CLOSE>0,FROMOPEN)-1-MOD(COUNT(CLOSE>0,FROMOPEN)-1,10))/10+1;
X_23:=LOG(SMA(SUM(DYNAINFO(37),FROMOPEN)*2400000/X_22,3,1))-1;
X_24:=IF(X_23>REF(X_23,1),1,IF(X_23=REF(X_23,1),2,3));
X_25:=IF(X_23>3.6,4,IF(X_23>2.7,5,IF(X_23>1.8,6,IF(X_23>0.9,7,8))));
X_26:=IF(X_2>10,4,IF(X_2>5,5,IF(X_2>1.5,6,IF(DYNAINFO(17)>0.8,7,8))));
X_27:=IF(DYNAINFO(17)-REF(DYNAINFO(17),1)>REF(DYNAINFO(17)-REF(DYNAINFO(17),1),1),1,IF(DYNAINFO(17)-REF(DYNAINFO(17),1)=REF(DYNAINFO(17)-REF(DYNAINFO(17),1),1),2,3));{股票指标网}
X_28:=IF(COUNT(CLOSE>0,FROMOPEN)>119,30,1);
DRAWTEXT(CURRBARSCOUNT=X_28,90,STRCAT(9,STRCAT(X_26,X_27))),COLORRED;
DRAWTEXT(CURRBARSCOUNT=X_28,(-90),STRCAT(10,STRCAT(X_25,X_24))),COLORGREEN;
未来函数检测结果如下:
该公式包含未来函数:COST
该公式包含未来函数:DYNAINFO
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
X_1赋值:均价
X_2赋值:DYNAINFO(17)
X_3赋值:(统计FROM开盘价日满足收盘价>0的天数-1-MOD(统计FROM开盘价日满足收盘价>0的天数-1,10))/10+1
X_4赋值:EMA(LOG(SMA(SUM(DYNAINFO(37),FROM开盘价)*2400000/X_3,3,1)),240)
X_5赋值:(收盘价/均价-(MA(收盘价/均价,55)+MA(收盘价/均价,21)+MA(收盘价/均价,34))/3)/MA(收盘价/均价,3)*1200
X_6赋值:2*((收盘价的12日指数移动平均-收盘价的26日指数移动平均)*600/均价-EMA((收盘价的12日指数移动平均-收盘价的26日指数移动平均)*600/均价,9))*10
X_7赋值:40的成交额日累和/(成交额/成交量/100)/100
X_8赋值:80的成交额日累和/(成交额/成交量/100)/100
X_9赋值:(收盘价-DMA((3*最高价+最低价+开盘价+2*收盘价)/7,成交量/X_7))/DMA((3*最高价+最低价+开盘价+2*收盘价)/7,成交量/X_7)*(9000/X_4)
X_10:=(收盘价-DMA((3*最高价+最低价+开盘价+2*收盘价)/7,成交量/X_8))/DMA((3*最高价+最低价+开盘价+2*收盘价)/7,成交量/X_8)*(9000/X_4)
X_11:=3*SMA((收盘价-55日内最低价最低值)/(55日内最高价最高值-55日内最低价最低值)*100,5,1)-2*SMA(SMA((收盘价-55日内最低价最低值)/(55日内最高价最高值-55日内最低价最低值)*100,5,1),3,1)
X_12:=IF(X_10>0,X_10-100,(-100))
如果X_10<0返回X_10+100否则返回100
X_14:=IF(X_9>0,X_9-100,(-100))
如果X_9<0返回X_9+100否则返回100
X_16:=EMA((-100)*(34日内最高价最高值-收盘价)/(34日内最高价最高值-34日内最低价最低值),3)
X_17:=EMA(100-3*SMA((75日内最低价最低值-收盘价)/(75日内最高价最高值-75日内最低价最低值)*100,18,1)+2*SMA(SMA((75日内最低价最低值-收盘价)/(75日内最高价最高值-75日内最低价最低值)*100,18,1),15,1)-100,3)
X_18:=100*(55日内最高价最高值-收盘价)/(55日内最高价最高值-55日内收盘价最低值)
X_19:=(收盘价的500日指数移动平均-1日前的收盘价的500日指数移动平均)/1日前的收盘价的500日指数移动平均*61800
X_20:=(X_16+X_17-X_18+50)/135
如果X_20>0.8返回X_20否则返回DRAWNULL
输出必买:IF(X_20<(-0.8),-X_20,DRAWNULL),NODRAW,画绿色
如果0<=X_20 AND X_20<=0.8返回X_20否则返回DRAWNULL
输出机遇:IF(X_20>(-0.8) AND X_20<0,-X_20,DRAWNULL),NODRAW, 画蓝色
输出卖:IF(收盘价>获利盘为86%的成本分布,COST(95),DRAWNULL),NODRAW,COLORLIRED
输出买:IF(收盘价<获利盘为14%的成本分布,COST(5),DRAWNULL),NODRAW,COLORLIGREEN
输出点:IF(X_19<(-1.2) OR X_19>1.2,X_19*0.382,DRAWNULL),NODRAW,COLORLIBLUE
输出趋势:(X_17*2-100)/1.2,画白色
X_21:=((收盘价/(FROM开盘价的成交量*收盘价日累和/FROM开盘价的成交量日累和)-1)*61.799999+(收盘价/(0的成交量*收盘价日累和/0的成交量日累和)-1)*38.200001)*((收盘价/X_1-1)*68.199997+(收盘价/收盘价的480日指数移动平均-1)*38.200001)
IF(X_21>0.618 AND 收盘价>X_1,SQRT(X_21)*19.1-100,(-100)),画青色, 线宽为2
IF(X_21>0.618 AND 收盘价
X_22:=(统计FROM开盘价日满足收盘价>0的天数-1-MOD(统计FROM开盘价日满足收盘价>0的天数-1,10))/10+1
X_23:=LOG(SMA(SUM(DYNAINFO(37),FROM开盘价)*2400000/X_22,3,1))-1
X_24:=IF(X_23>1日前的X_23,1,IF(X_23=1日前的X_23,2,3))
X_25:=IF(X_23>3.6,4,IF(X_23>2.7,5,IF(X_23>1.8,6,IF(X_23>0.9,7,8))))
X_26:=IF(X_2>10,4,IF(X_2>5,5,IF(X_2>1.5,6,IF(DYNAINFO(17)>0.8,7,8))))
X_27:=IF(DYNAINFO(17)-REF(DYNAINFO(17),1)>REF(DYNAINFO(17)-REF(DYNAINFO(17),1),1),1,IF(DYNAINFO(17)-REF(DYNAINFO(17),1)=REF(DYNAINFO(17)-REF(DYNAINFO(17),1),1),2,3))
{股票指标网}
X_28:=IF(统计FROM开盘价日满足收盘价>0的天数>119,30,1)
DRAWTEXT( 到最后交易的周期=X_28,90,STRCAT(9,STRCAT(X_26,X_27))),画红色
DRAWTEXT( 到最后交易的周期=X_28,(-90),STRCAT(10,STRCAT(X_25,X_24))),画绿色