通达信多空上攻指标公式源码
VAR1:=25;
VAR2:=13;
VAR3:=13;
VAR4:=CLOSE-REF(CLOSE,1);
VAR5:=EMA(EMA(VAR4,VAR1),VAR2);
VAR6:=EMA(EMA(Abs(VAR4),VAR1),VAR2);
VAR7:=vol/REF(VOL,1)>=1.9 AND CLOSE/REF(CLOSE,1)>=1.58;
VAR8:=90;
VAR9:=VOL>=HHV(VOL,VAR8);
VAR10:=MA(VOL,5);
VAR11:=MA(VOL,35);
VAR12:=MA(VOL,135);
VAR13:=crOSS(VAR10,VAR11) AND VOL>VAR10 AND VOL>VAR12*2;
VAR14:=(CLOSE-REF(CLOSE,1))/REF(CLOSE,1)*100;
多:100*(VAR5/VAR6),COLORRED;
空:EMA(多,VAR3),COLORGREEN;
0,POINTDOT,COLORWHITE;
VAR15:=CROSS(多,空);
VAR16:=VAR15 AND (VAR7 OR VAR9 OR VAR13 OR VAR14>=9.6);
VAR17:=IF(CLOSE/REF(CLOSE,1)>1.094 AND CLOSE=HIGH AND CLOSE=OPEN,HHV(VOL,20),VOL);
VAR18:=(-100)*(HHV(VAR17,60)-VAR17)/(HHV(VAR17,60)-LLV(VAR17,60));
VAR19:=100*(HHV(HIGH,60)-CLOSE)/(HHV(HIGH,60)-LLV(LOW,60));
VAR20:=VAR19<20 AND VAR18>(-20);
VAR21:=VAR20;
VAR22:=(HIGH+LOW+CLOSE)/3;
VAR23:=(VAR22-MA(VAR22,14))/(0.015*AVEDEV(VAR22,14));
VAR24:=(VAR22-MA(VAR22,70))/(0.015*AVEDEV(VAR22,70));
VAR25:=(VAR22-MA(VAR22,308))/(0.015*AVEDEV(VAR22,308));
VAR26:=IF(VAR25<IF(VAR23>VAR24,VAR24,VAR23),VAR25,IF(VAR23>VAR24,VAR24,VAR23));
VAR27:=VAR26>100;
VAR28:=VAR27;
VAR29:=100*(HHV(HIGH,5)-CLOSE)/(HHV(HIGH,5)-LLV(LOW,5));
VAR30:=(-100)*(HHV(VAR17,5)-VAR17)/(HHV(VAR17,5)-LLV(VAR17,5));
VAR31:=VAR30>(-20) AND VAR29<20 AND VAR23>100;
VAR32:=VAR31 AND COUNT(VAR31,10)=1;
VAR33:=VAR32;
VAR34:=EXIST(VAR33=1,5);
VAR35:=VAR9;
VAR36:=EXIST(VAR35=1,5);
VAR37:=VAR13;
VAR38:=EXIST(VAR37=1,5);
VAR39:=VAR21 AND VAR28;
VAR40:=VAR21 AND VAR28 AND VAR33;
VAR41:=VAR21 AND VAR34 AND (VAR36 OR VAR38);
VAR42:=VAR28 AND VAR34 AND (VAR36 OR VAR38);
VAR43:=VAR39 OR VAR40 OR VAR41 OR VAR42;
VAR44:=IF(VAR43 AND REF(VAR43,1)=0,1,0);
VAR45:=EVERY(CLOSE>=ZTPRICE(REF(CLOSE,1),0.1),BARSCOUNT(CLOSE)) AND CLOSE=LOW OR ZSTJJ AND CLOSE=HIGH;
VAR46:=NOT(DYNAINFO(4)=0);
VAR47:=(CLOSE-REF(CLOSE,1))/REF(CLOSE,1)*100;
VAR48:=VAR47>9.8 AND HIGH=CLOSE;
VAR49:=COUNT(VAR48,3)>=2 AND VAR46 AND NOT(VAR45) AND COUNT(VAR45,3)<1;
VAR50:=COUNT(VAR15,30)>=1 AND (VAR44 OR VAR49);
VAR51:=VAR16 OR VAR50 AND VAR14>=5.8;
VAR52:=IF(VAR51 AND REF(VAR51,1)=0,1,0);
VAR53:=100*(CLOSE-LLV(LOW,5))/(HHV(CLOSE,5)-LLV(LOW,5));
VAR54:=100*(CLOSE-LLV(LOW,10))/(HHV(CLOSE,10)-LLV(LOW,10));
VAR55:=100*(CLOSE-LLV(LOW,20))/(HHV(CLOSE,20)-LLV(LOW,20));
VAR56:=100*(CLOSE-LLV(LOW,30))/(HHV(CLOSE,30)-LLV(LOW,30));
VAR57:=MA(CLOSE,26);
VAR58:=VAR57+2*STD(CLOSE,26);
VAR59:=VAR53=100 AND REF(VAR53,1)=100 AND REF(VAR53,2)=100 AND VAR56>35 AND VAR56>REF(VAR56,1)+5 AND REF(VAR56,1)>REF(VAR56,2);
VAR60:=VAR53=100 AND REF(VAR53,1)=100 AND VAR56=100 AND REF(VAR56,1)>50 AND REF(VAR56,1)<80 AND VAR56>REF(VAR56,1)+3;
VAR61:=REF(VAR54,1)>=REF(VAR53,1);
VAR62:=50;
VAR63:=VAR61 AND REF(VAR53,1)>=REF(VAR55,1) AND REF(VAR55,1)>=REF(VAR56,1) AND REF(VAR53,2)>=REF(VAR54,2) AND REF(VAR54,2)> REF(VAR55,2) AND REF(VAR55,2)>REF(VAR56,2) AND REF(VAR54,3)>REF(VAR55,3) AND REF(VAR55,3)>REF(VAR56,3);
VAR64:=VAR56>VAR62;
VAR65:=CLOSE<VAR58;
VAR66:=VAR59 OR VAR60 AND VAR63 AND VAR64 AND VAR65;
VAR67:=CLOSE;
VAR68:=88;
VAR69:=91;
VAR70:=HIGH;
VAR71:=IF(VAR67>REF(VAR67,1),VAR68,0);
VAR72:=IF(VAR67/REF(VAR67,1)>1.05 AND VAR70/VAR67<1.01 AND VAR71>0,VAR69,0);
VAR73:=FILTER(VAR72>90,45)=1;
VAR74:=MAX(CLOSE,OPEN);
VAR75:=HHV(VAR74,30);
VAR76:=CLOSE>REF(VAR75,1);
VAR77:=HHV(VOL,60);
VAR78:=VOL>REF(VAR77,1);
VAR79:=VAR76 AND VAR78;
VAR80:=IF(VAR79 AND REF(VAR79,1)=0,1,0);
VAR81:=IF(CURRBARSCOUNT=1 AND PERIOD=5,VOL*240/FROMOPEN,VOL);
VAR82:=MA(VAR81,5);
VAR83:=MA(VAR81,60);
VAR84:=CROSS(VAR82,VAR83);
VAR85:=MA(VOL,5);
VAR86:=MA(VOL,35);
VAR87:=MA(VOL,135);
VAR88:=CROSS(VAR85,VAR86) AND VOL>VAR85 AND VOL>VAR87*2;
VAR95:=FILTER(VAR88,20);
VAR96:=VOL>=HHV(VOL,90);
STICKLINE((VAR52 AND VAR84) OR (VAR52 AND VAR95) OR (VAR52 AND VAR96),空,空+15,1,0),COLORRED,LINETHICK2;
DRAWTEXT((VAR52 AND VAR84) OR (VAR52 AND VAR95) OR (VAR52 AND VAR96),空+10,'趋势买点'),COLORYELLOW;
STICKLINE(FILTER((VAR66 AND VAR84) OR (VAR66 AND VAR95) OR (VAR66 AND VAR96),12),多+15,多,1,0),COLORRED,LINETHICK3;
DRAWTEXT(FILTER((VAR66 AND VAR84) OR (VAR66 AND VAR95) OR (VAR66 AND VAR96),12),多+18,'即将大涨'),COLORYELLOW;
STICKLINE((VAR73 AND VAR84) OR (VAR73 AND VAR95) OR (VAR73 AND VAR96),多+15,多,1,0),COLORRED,LINETHICK3;
DRAWTEXT((VAR73 AND VAR84) OR (VAR73 AND VAR95) OR (VAR73 AND VAR96),多+18,'龙抬头'),COLORYELLOW;
STICKLINE((VAR80 AND VAR84) OR (VAR80 AND VAR95) OR (VAR80 AND VAR96),多+15,多,1,0),COLORRED,LINETHICK3;
DRAWTEXT((VAR80 AND VAR84) OR (VAR80 AND VAR95) OR (VAR80 AND VAR96),多+18,'上攻'),COLORYELLOW;
未来函数检测结果如下:
该公式包含未来函数:DYNAINFO
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
VAR1赋值:25
VAR2赋值:13
VAR3赋值:13
VAR4赋值:收盘价-1日前的收盘价
VAR5赋值:VAR4的VAR1日指数移动平均,VAR2)
VAR6赋值:EMA(EMA(VAR4的绝对值,VAR1),VAR2)
VAR7赋值:成交量/1日前的成交量>=1.9 AND 收盘价/1日前的收盘价>=1.58
VAR8赋值:90
VAR9赋值:成交量>=VAR8日内成交量最高值
VAR10:=成交量的5日简单移动平均
VAR11:=成交量的35日简单移动平均
VAR12:=成交量的135日简单移动平均
VAR13:=VAR10上穿VAR11 AND 成交量>VAR10 AND 成交量>VAR12*2
VAR14:=(收盘价-1日前的收盘价)/1日前的收盘价*100
输出多:100*(VAR5/VAR6),画红色
输出空:多的VAR3日指数移动平均,画绿色
0,POINTDOT,画白色
VAR15:=多上穿空
VAR16:=VAR15 AND (VAR7 OR VAR9 OR VAR13 OR VAR14>=9.6)
VAR17:=IF(收盘价/1日前的收盘价>1.094 AND 收盘价=最高价 AND 收盘价=开盘价,20日内成交量最高值,成交量)
VAR18:=(-100)*(60日内VAR17最高值-VAR17)/(60日内VAR17最高值-60日内VAR17最低值)
VAR19:=100*(60日内最高价最高值-收盘价)/(60日内最高价最高值-60日内最低价最低值)
VAR20:=VAR19<20 AND VAR18>(-20)
VAR21:=VAR20
VAR22:=(最高价+最低价+收盘价)/3
VAR23:=(VAR22-VAR22的14日简单移动平均)/(0.015*AVEDEV(VAR22,14))
VAR24:=(VAR22-VAR22的70日简单移动平均)/(0.015*AVEDEV(VAR22,70))
VAR25:=(VAR22-VAR22的308日简单移动平均)/(0.015*AVEDEV(VAR22,308))
如果VAR25VAR24返回VAR24否则返回VAR23
VAR27:=VAR26>100
VAR28:=VAR27
VAR29:=100*(5日内最高价最高值-收盘价)/(5日内最高价最高值-5日内最低价最低值)
VAR30:=(-100)*(5日内VAR17最高值-VAR17)/(5日内VAR17最高值-5日内VAR17最低值)
VAR31:=VAR30>(-20) AND VAR29<20 AND VAR23>100
VAR32:=VAR31 AND 统计10日满足VAR31的天数=1
VAR33:=VAR32
VAR34:=最近5日存在VAR33=1
VAR35:=VAR9
VAR36:=最近5日存在VAR35=1
VAR37:=VAR13
VAR38:=最近5日存在VAR37=1
VAR39:=VAR21 AND VAR28
VAR40:=VAR21 AND VAR28 AND VAR33
VAR41:=VAR21 AND VAR34 AND (VAR36 OR VAR38)
VAR42:=VAR28 AND VAR34 AND (VAR36 OR VAR38)
VAR43:=VAR39 OR VAR40 OR VAR41 OR VAR42
VAR44:=IF(VAR43 AND 1日前的VAR43=0,1,0)
VAR45:=EVERY(收盘价>=ZTPRICE(1日前的收盘价,0.1),收盘价的有效数据周期数) AND 收盘价=最低价 OR ZSTJJ AND 收盘价=最高价
VAR46:=NOT(开盘价=0)
VAR47:=(收盘价-1日前的收盘价)/1日前的收盘价*100
VAR48:=VAR47>9.8 AND 最高价=收盘价
VAR49:=统计3日满足VAR48的天数>=2 AND VAR46 AND NOT(VAR45) AND 统计3日满足VAR45的天数<1
VAR50:=统计30日满足VAR15的天数>=1 AND (VAR44 OR VAR49)
VAR51:=VAR16 OR VAR50 AND VAR14>=5.8
VAR52:=IF(VAR51 AND 1日前的VAR51=0,1,0)
VAR53:=100*(收盘价-5日内最低价最低值)/(5日内收盘价最高值-5日内最低价最低值)
VAR54:=100*(收盘价-10日内最低价最低值)/(10日内收盘价最高值-10日内最低价最低值)
VAR55:=100*(收盘价-20日内最低价最低值)/(20日内收盘价最高值-20日内最低价最低值)
VAR56:=100*(收盘价-30日内最低价最低值)/(30日内收盘价最高值-30日内最低价最低值)
VAR57:=收盘价的26日简单移动平均
VAR58:=VAR57+2*收盘价的26估算标准差
VAR59:=VAR53=100 AND 1日前的VAR53=100 AND 2日前的VAR53=100 AND VAR56>35 AND VAR56>1日前的VAR56+5 AND 1日前的VAR56>2日前的VAR56
VAR60:=VAR53=100 AND 1日前的VAR53=100 AND VAR56=100 AND 1日前的VAR56>50 AND 1日前的VAR56<80 AND VAR56>1日前的VAR56+3
VAR61:=1日前的VAR54>=1日前的VAR53
VAR62:=50
VAR63:=VAR61 AND 1日前的VAR53>=1日前的VAR55 AND 1日前的VAR55>=1日前的VAR56 AND 2日前的VAR53>=2日前的VAR54 AND 2日前的VAR54> 2日前的VAR55 AND 2日前的VAR55>2日前的VAR56 AND 3日前的VAR54>3日前的VAR55 AND 3日前的VAR55>3日前的VAR56
VAR64:=VAR56>VAR62
VAR65:=收盘价
VAR66:=VAR59 OR VAR60 AND VAR63 AND VAR64 AND VAR65
VAR67:=收盘价
VAR68:=88
VAR69:=91
VAR70:=最高价
VAR71:=IF(VAR67>1日前的VAR67,VAR68,0)
VAR72:=IF(VAR67/1日前的VAR67>1.05 AND VAR70/VAR67<1.01 AND VAR71>0,VAR69,0)
VAR73:=VAR72>90的45过滤=1
VAR74:=收盘价和开盘价较大值
VAR75:=30日内VAR74最高值
VAR76:=收盘价>1日前的VAR75
VAR77:=60日内成交量最高值
VAR78:=成交量>1日前的VAR77
VAR79:=VAR76 AND VAR78
VAR80:=IF(VAR79 AND 1日前的VAR79=0,1,0)
如果 到最后交易的周期=1 AND PERIOD=5返回成交量*240/FROM开盘价否则返回成交量
VAR82:=VAR81的5日简单移动平均
VAR83:=VAR81的60日简单移动平均
VAR84:=VAR82上穿VAR83
VAR85:=成交量的5日简单移动平均
VAR86:=成交量的35日简单移动平均
VAR87:=成交量的135日简单移动平均
VAR88:=VAR85上穿VAR86 AND 成交量>VAR85 AND 成交量>VAR87*2
VAR95:=VAR88的20过滤
VAR96:=成交量>=90日内成交量最高值
STICKLINE((VAR52 AND VAR84) OR (VAR52 AND VAR95) OR (VAR52 AND VAR96),空,空+15,1,0),画红色, 线宽为2
DRAWTEXT((VAR52 AND VAR84) OR (VAR52 AND VAR95) OR (VAR52 AND VAR96),空+10,'趋势买点'),画黄色
STICKLINE(FILTER((VAR66 AND VAR84) OR (VAR66 AND VAR95) OR (VAR66 AND VAR96),12),多+15,多,1,0),画红色, 线宽为3
DRAWTEXT(FILTER((VAR66 AND VAR84) OR (VAR66 AND VAR95) OR (VAR66 AND VAR96),12),多+18,'即将大涨'),画黄色
STICKLINE((VAR73 AND VAR84) OR (VAR73 AND VAR95) OR (VAR73 AND VAR96),多+15,多,1,0),画红色, 线宽为3
DRAWTEXT((VAR73 AND VAR84) OR (VAR73 AND VAR95) OR (VAR73 AND VAR96),多+18,'龙抬头'),画黄色
STICKLINE((VAR80 AND VAR84) OR (VAR80 AND VAR95) OR (VAR80 AND VAR96),多+15,多,1,0),画红色, 线宽为3
DRAWTEXT((VAR80 AND VAR84) OR (VAR80 AND VAR95) OR (VAR80 AND VAR96),多+18,'上攻'),画黄色