绝有新春版通达信公式 副图 源码 贴图和谐源码
VAR1:=DYNAINFO(11);
VAR2:=DYNAINFO(17);
VAR3:=(COUNT(CLOSE>0,FROMOPEN)-1-MOD(COUNT(CLOSE>0,FROMOPEN)-1,10))/10+1;
VAR4:=EMA(LOG(SMA(SUM(DYNAINFO(37),FROMOPEN)*2400000/VAR3,3,1)),240);
VAR5:=(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;
VAR6:=2*((EMA(CLOSE,12)-EMA(CLOSE,26))*600/DYNAINFO(11)-EMA((EMA(CLOSE,12)-EMA(CLOSE,26))*600/DYNAINFO(11),9))*10;
VAR7:=CEILING(MAX(HHV(ABS(VAR5),0),HHV(ABS(VAR6),0))/40);
VAR8:=1.2/VAR7;
VAR9:=SUM(AMOUNT,40)/(AMOUNT/VOL/100)/100;
VAR10:=SUM(AMOUNT,80)/(AMOUNT/VOL/100)/100;
VAR11:=(CLOSE-DMA((3*HIGH+LOW+OPEN+2*CLOSE)/7,VOL/VAR9))/DMA((3*HIGH+LOW+OPEN+2*CLOSE)/7,VOL/VAR9)*(9000/VAR4);
VAR12:=(CLOSE-DMA((3*HIGH+LOW+OPEN+2*CLOSE)/7,VOL/VAR10))/DMA((3*HIGH+LOW+OPEN+2*CLOSE)/7,VOL/VAR10)*(9000/VAR4);
VAR13:=CEILING(MAX(HHV(ABS(VAR11),0),HHV(ABS(VAR12),0))/38);
VAR14:=2/VAR13;{股票指标网}
VAR15:=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);
VAR16:=IF(VAR12>0,VAR12*VAR14-100,(-100));
VAR17:=IF(VAR12<0,VAR12*VAR14+100,100);
VAR18:=IF(VAR11>0,VAR11*VAR14-100,(-100));
VAR19:=IF(VAR11<0,VAR11*VAR14+100,100);
VAR20:=EMA((-100)*(HHV(HIGH,34)-CLOSE)/(HHV(HIGH,34)-LLV(LOW,34)),3);
VAR21:=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);
VAR22:=100*(HHV(HIGH,55)-CLOSE)/(HHV(HIGH,55)-LLV(CLOSE,55));
VAR23:=(EXPMA(CLOSE,500)-REF(EXPMA(CLOSE,500),1))/REF(EXPMA(CLOSE,500),1)*61800;
VAR24:=(VAR20+VAR21-VAR22+50)/135;{股票指标网}
DRAWBAND(VAR5*VAR8,RGB(255,20,107),0,RGB(34,139,34));
DRAWBAND(VAR6*VAR8,RGB(175,255,47),0,RGB(106,90,205));
DRAWBAND(VAR16,RGB(255,0,0),(-100),RGB(0,0,0));
DRAWBAND(100,RGB(0,255,0),VAR17,RGB(0,0,0));
DRAWBAND(VAR18,RGB(255,255,0),(-100),RGB(0,0,0));
DRAWBAND(100,RGB(0,0,255),VAR19,RGB(0,0,0));
STICKLINE((-(EMA(VAR15,3)-50))*1.2>39*1.2,39*1.2,(-(EMA(VAR15,3)-50))*1.2,0,0),COLORLICYAN;
STICKLINE((-(EMA(VAR15,3)-50))*1.2<(-39)*1.2,(-39)*1.2,(-(EMA(VAR15,3)-50))*1.2,0,0),COLORLIMAGENTA;
必卖:IF(VAR24>0.8,VAR24,DRAWNULL),NODRAW,COLORRED;
必买:IF(VAR24<(-0.8),-VAR24,DRAWNULL),NODRAW,COLORGREEN;
危险:IF(0<=VAR24 AND VAR24<=0.8,VAR24,DRAWNULL),NODRAW,COLORYELLOW;
机遇:IF(VAR24>(-0.8) AND VAR24<0,-VAR24,DRAWNULL),NODRAW,COLORBLUE;
卖:IF(CLOSE>COST(86),COST(95),DRAWNULL),NODRAW,COLORLIRED;
买:IF(CLOSE<COST(14),COST(5),DRAWNULL),NODRAW,COLORLIGREEN;
点:IF(VAR23<(-1.2) OR VAR23>1.2,VAR23*0.382,DRAWNULL),NODRAW,COLORLIBLUE;
趋势:(VAR21*2-100)/1.2,COLORWHITE,LINETHICK2;{股票指标网}
VAR25:=((CLOSE/(SUM(VOL*CLOSE,FROMOPEN)/SUM(VOL,FROMOPEN))-1)*61.799999+(CLOSE/(SUM(VOL*CLOSE,0)/SUM(VOL,0))-1)*38.200001)*((CLOSE/VAR1-1)*68.199997+(CLOSE/EMA(CLOSE,480)-1)*38.200001);
IF(VAR25>0.618 AND CLOSE>VAR1,SQRT(VAR25)*19.1-100,(-100)),COLORCYAN,LINETHICK5;
IF(VAR25>0.618 AND CLOSE<VAR1,100-SQRT(VAR25)*19.1,100),COLORMAGENTA,LINETHICK5;
VAR26:=(COUNT(CLOSE>0,FROMOPEN)-1-MOD(COUNT(CLOSE>0,FROMOPEN)-1,10))/10+1;
VAR27:=LOG(SMA(SUM(DYNAINFO(37),FROMOPEN)*2400000/VAR26,3,1))-1;
VAR28:=IF(VAR27>REF(VAR27,1),12,IF(VAR27=REF(VAR27,1),13,14));
VAR29:=STRCAT(CON2STR(VAR13,0),IF(VAR27>3.6,2018,IF(VAR27>2.7,2019,IF(VAR27>1.8,2020,IF(VAR27>0.9,2021,2022)))));
VAR30:=STRCAT(CON2STR(VAR7,0),IF(VAR2>10,2018,IF(VAR2>5,2019,IF(VAR2>1.5,2020,IF(DYNAINFO(17)>0.8,2021,2022)))));
VAR31:=IF(DYNAINFO(17)-REF(DYNAINFO(17),1)>REF(DYNAINFO(17)-REF(DYNAINFO(17),1),1),12,IF(DYNAINFO(17)-REF(DYNAINFO(17),1)=REF(DYNAINFO(17)-REF(DYNAINFO(17),1),1),13,14));
VAR32:=IF(COUNT(CLOSE>0,FROMOPEN)>119,40,1);
DRAWTEXT(CURRBARSCOUNT=VAR32,90,STRCAT(2023,STRCAT(VAR30,VAR31))),COLORRED;
DRAWTEXT(CURRBARSCOUNT=VAR32,(-90),STRCAT(2024,STRCAT(VAR29,VAR28))),COLORGREEN;
未来函数检测结果如下:
该公式包含未来函数:COST
该公式包含未来函数:DYNAINFO
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
VAR1赋值:均价
VAR2赋值:DYNAINFO(17)
VAR3赋值:(统计FROM开盘价日满足收盘价>0的天数-1-MOD(统计FROM开盘价日满足收盘价>0的天数-1,10))/10+1
VAR4赋值:EMA(LOG(SMA(SUM(DYNAINFO(37),FROM开盘价)*2400000/VAR3,3,1)),240)
VAR5赋值:(收盘价/均价-(MA(收盘价/均价,55)+MA(收盘价/均价,21)+MA(收盘价/均价,34))/3)/MA(收盘价/均价,3)*1200
VAR6赋值:2*((收盘价的12日指数移动平均-收盘价的26日指数移动平均)*600/均价-EMA((收盘价的12日指数移动平均-收盘价的26日指数移动平均)*600/均价,9))*10
VAR7赋值:CEILING(MAX(HHV(VAR5的绝对值,0),HHV(ABS(VAR6),0))/40)
VAR8赋值:1.2/VAR7
VAR9赋值:40的成交额日累和/(成交额/成交量/100)/100
VAR10:=80的成交额日累和/(成交额/成交量/100)/100
VAR11:=(收盘价-DMA((3*最高价+最低价+开盘价+2*收盘价)/7,成交量/VAR9))/DMA((3*最高价+最低价+开盘价+2*收盘价)/7,成交量/VAR9)*(9000/VAR4)
VAR12:=(收盘价-DMA((3*最高价+最低价+开盘价+2*收盘价)/7,成交量/VAR10))/DMA((3*最高价+最低价+开盘价+2*收盘价)/7,成交量/VAR10)*(9000/VAR4)
VAR13:=CEILING(MAX(HHV(VAR11的绝对值,0),HHV(ABS(VAR12),0))/38)
VAR14:=2/VAR13
{股票指标网}
VAR15:=3*SMA((收盘价-55日内最低价最低值)/(55日内最高价最高值-55日内最低价最低值)*100,5,1)-2*SMA(SMA((收盘价-55日内最低价最低值)/(55日内最高价最高值-55日内最低价最低值)*100,5,1),3,1)
VAR16:=IF(VAR12>0,VAR12*VAR14-100,(-100))
如果VAR12<0返回VAR12*VAR14+100否则返回100
VAR18:=IF(VAR11>0,VAR11*VAR14-100,(-100))
如果VAR11<0返回VAR11*VAR14+100否则返回100
VAR20:=EMA((-100)*(34日内最高价最高值-收盘价)/(34日内最高价最高值-34日内最低价最低值),3)
VAR21:=EMA(100-3*SMA((75日内最低价最低值-收盘价)/(75日内最高价最高值-75日内最低价最低值)*100,18,1)+2*SMA(SMA((75日内最低价最低值-收盘价)/(75日内最高价最高值-75日内最低价最低值)*100,18,1),15,1)-100,3)
VAR22:=100*(55日内最高价最高值-收盘价)/(55日内最高价最高值-55日内收盘价最低值)
VAR23:=(收盘价的500日指数移动平均-1日前的收盘价的500日指数移动平均)/1日前的收盘价的500日指数移动平均*61800
VAR24:=(VAR20+VAR21-VAR22+50)/135
{股票指标网}
DRAWBAND(VAR5*VAR8,RGB(255,20,107),0,RGB(34,139,34))
DRAWBAND(VAR6*VAR8,RGB(175,255,47),0,RGB(106,90,205))
DRAWBAND(VAR16,RGB(255,0,0),(-100),RGB(0,0,0))
DRAWBAND(100,RGB(0,255,0),VAR17,RGB(0,0,0))
DRAWBAND(VAR18,RGB(255,255,0),(-100),RGB(0,0,0))
DRAWBAND(100,RGB(0,0,255),VAR19,RGB(0,0,0))
STICKLINE((-(VAR15的3日指数移动平均-50))*1.2>39*1.2,39*1.2,(-(VAR15的3日指数移动平均-50))*1.2,0,0),COLORLICYAN
STICKLINE((-(VAR15的3日指数移动平均-50))*1.2<(-39)*1.2,(-39)*1.2,(-(VAR15的3日指数移动平均-50))*1.2,0,0),COLORLIMAGENTA
如果VAR24>0.8返回VAR24否则返回DRAWNULL
输出必买:IF(VAR24<(-0.8),-VAR24,DRAWNULL),NODRAW,画绿色
如果0<=VAR24 AND VAR24<=0.8返回VAR24否则返回DRAWNULL
输出机遇:IF(VAR24>(-0.8) AND VAR24<0,-VAR24,DRAWNULL),NODRAW, 画蓝色
输出卖:IF(收盘价>获利盘为86%的成本分布,COST(95),DRAWNULL),NODRAW,COLORLIRED
输出买:IF(收盘价<获利盘为14%的成本分布,COST(5),DRAWNULL),NODRAW,COLORLIGREEN
输出点:IF(VAR23<(-1.2) OR VAR23>1.2,VAR23*0.382,DRAWNULL),NODRAW,COLORLIBLUE
输出趋势:(VAR21*2-100)/1.2,画白色, 线宽为2
{股票指标网}
VAR25:=((收盘价/(FROM开盘价的成交量*收盘价日累和/FROM开盘价的成交量日累和)-1)*61.799999+(收盘价/(0的成交量*收盘价日累和/0的成交量日累和)-1)*38.200001)*((收盘价/VAR1-1)*68.199997+(收盘价/收盘价的480日指数移动平均-1)*38.200001)
IF(VAR25>0.618 AND 收盘价>VAR1,SQRT(VAR25)*19.1-100,(-100)),画青色,LINETHICK5
IF(VAR25>0.618 AND 收盘价
VAR26:=(统计FROM开盘价日满足收盘价>0的天数-1-MOD(统计FROM开盘价日满足收盘价>0的天数-1,10))/10+1
VAR27:=LOG(SMA(SUM(DYNAINFO(37),FROM开盘价)*2400000/VAR26,3,1))-1
VAR28:=IF(VAR27>1日前的VAR27,12,IF(VAR27=1日前的VAR27,13,14))
VAR29:=STRCAT(CON2STR(VAR13,0),IF(VAR27>3.6,2018,IF(VAR27>2.7,2019,IF(VAR27>1.8,2020,IF(VAR27>0.9,2021,2022)))))
VAR30:=STRCAT(CON2STR(VAR7,0),IF(VAR2>10,2018,IF(VAR2>5,2019,IF(VAR2>1.5,2020,IF(DYNAINFO(17)>0.8,2021,2022)))))
VAR31:=IF(DYNAINFO(17)-REF(DYNAINFO(17),1)>REF(DYNAINFO(17)-REF(DYNAINFO(17),1),1),12,IF(DYNAINFO(17)-REF(DYNAINFO(17),1)=REF(DYNAINFO(17)-REF(DYNAINFO(17),1),1),13,14))
VAR32:=IF(统计FROM开盘价日满足收盘价>0的天数>119,40,1)
DRAWTEXT( 到最后交易的周期=VAR32,90,STRCAT(2023,STRCAT(VAR30,VAR31))),画红色
DRAWTEXT( 到最后交易的周期=VAR32,(-90),STRCAT(2024,STRCAT(VAR29,VAR28))),画绿色