通达信金牛主图公式源码

[复制链接]
查看38 | 回复0 | 2022-7-24 05:36:54 | 显示全部楼层 |阅读模式

通达信金牛主图公式

源码

STICKLINE(CLOSE> REF(CLOSE,1) ,HIGH,LOW,0,1 ),COLORRED;
 STICKLINE(CLOSE> REF(CLOSE,1) ,OPEN,CLOSE,3.1,0 ),COLOR000055;
 STICKLINE(CLOSE> REF(CLOSE,1) ,OPEN,CLOSE,2.7,0 ),COLOR000088;
 STICKLINE(CLOSE> REF(CLOSE,1) ,OPEN,CLOSE,2.1,0 ),COLOR0000AA;
 STICKLINE(CLOSE> REF(CLOSE,1) ,OPEN,CLOSE,1.5,0 ),COLOR0000CC;
 STICKLINE(CLOSE> REF(CLOSE,1) ,OPEN,CLOSE,0.9,0 ),COLOR0000FF;
 STICKLINE(CLOSE> REF(CLOSE,1) ,OPEN,CLOSE,0.3,0 ),COLOR0000EE;
 STICKLINE(CLOSE< REF(CLOSE,1) ,HIGH,LOW,0,1 ),COLOR666600;
 STICKLINE(CLOSE< REF(CLOSE,1) ,OPEN,CLOSE,3.1,0 ),COLOR555500;
 STICKLINE(CLOSE< REF(CLOSE,1) ,OPEN,CLOSE,2.7,0 ),COLOR888800;
 STICKLINE(CLOSE< REF(CLOSE,1) ,OPEN,CLOSE,2.1,0 ),COLORAAAA00;
 STICKLINE(CLOSE< REF(CLOSE,1) ,OPEN,CLOSE,1.5,0 ),COLORBBBB00;
 STICKLINE(CLOSE< REF(CLOSE,1) ,OPEN,CLOSE,0.9,0 ),COLORCCCC00;
 STICKLINE(CLOSE< REF(CLOSE,1) ,OPEN,CLOSE,0.3,0 ),COLOREEEE00;
 STICKLINE(CLOSE= REF(CLOSE,1) ,HIGH,LOW,0,1 ),COLORWHITE;
 STICKLINE(CLOSE= REF(CLOSE,1) ,OPEN,CLOSE,3.1,0 ),COLOR555555;
 STICKLINE(CLOSE= REF(CLOSE,1) ,OPEN,CLOSE,2.7,0 ),COLOR777777;
 STICKLINE(CLOSE= REF(CLOSE,1) ,OPEN,CLOSE,2.1,0 ),COLOR999999;
 STICKLINE(CLOSE= REF(CLOSE,1) ,OPEN,CLOSE,1.5,0 ),COLORBBBBBB;
 STICKLINE(CLOSE= REF(CLOSE,1) ,OPEN,CLOSE,0.9,0 ),COLORDDDDDD;
 STICKLINE(CLOSE= REF(CLOSE,1) ,OPEN,CLOSE,0.3,0 ),COLORFFFFFF;
 SS1:=1121010;
 SS3:=DATE<SS1;
 AAA1:=(C-REF(C,1))/REF(C,1)>=0.058 AND (C-REF(C,1))/REF(C,1)<0.095 AND SS3;
 AA2:=(C-REF(C,1))/REF(C,1)>=0.098 AND SS3;
 VAR1:=CLOSE>REF(CLOSE,1) AND CLOSE>REF(CLOSE,2);
 VAR2:=REF(VAR1,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
 VAR3:=REF(VAR2,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
 VAR4:=REF(VAR3,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
 VAR5:=REF(VAR4,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
 VAR6:=REF(VAR5,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
 VAR7:=REF(VAR6,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
 VAR8:=REF(VAR7,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
 VAR9:=REF(VAR8,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
 VARA:=REF(VAR9,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
 VARB:=REF(VARA,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
 VARC:=REF(VARB,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
 {STICKLINE(VAR1 OR VAR2 OR VAR3 OR VAR4 OR VAR5 OR VAR6 OR VAR7 OR VAR8 OR VAR9 OR VARA OR VARB OR VARC,CLOSE,REF(CLOSE,1),3,1),COLORRED;
 {红1}} VARD:=CLOSE<REF(CLOSE,1) AND CLOSE<REF(CLOSE,2);
 VARE:=REF(VARD,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
 VARF:=REF(VARE,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
 VAR10:=REF(VARF,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
 VAR11:=REF(VAR10,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
 VAR12:=REF(VAR11,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
 VAR13:=REF(VAR12,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
 VAR14:=REF(VAR13,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
 VAR15:=REF(VAR14,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
 VAR16:=REF(VAR15,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
 VAR17:=REF(VAR16,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
 VAR18:=REF(VAR17,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
 {STICKLINE(VARD OR VARE OR VARF OR VAR10 OR VAR11 OR VAR12 OR VAR13 OR VAR14 OR VAR15 OR VAR16 OR VAR17 OR VAR18,CLOSE,REF(CLOSE,1),3,0),COLORFFCC66;
 } VAR19:=REF(VARD OR VARE OR VARF OR VAR10 OR VAR11 OR VAR12 OR VAR13 OR VAR14 OR VAR15 OR VAR16 OR VAR17 OR VAR18,1) AND VAR1;
 STICKLINE(VAR19,REF(CLOSE,1),REF(CLOSE,2),4,1),COLORYELLOW;
 VAR1A:=REF(VAR1 OR VAR2 OR VAR3 OR VAR4 OR VAR5 OR VAR6 OR VAR7 OR VAR8 OR VAR9 OR VARA OR VARB OR VARC,1) AND VARD;
 STICKLINE(VAR1A,REF(CLOSE,1),REF(CLOSE,2),5,2),COLOR00FF00{98FD};
 STICKLINE(VAR19,REF(CLOSE,1),REF(CLOSE,2),3,0),COLOR00C8FF;
 STICKLINE(VAR19,REF(CLOSE,1),REF(CLOSE,2),2,0),COLOR10ECFF;
 STICKLINE(VAR19,REF(CLOSE,1),REF(CLOSE,2),2,0),COLOR10FFFF;
 STICKLINE(VAR1A,REF(CLOSE,1),REF(CLOSE,2),3,0),COLOR00D900;
 STICKLINE(VAR1A,REF(CLOSE,1),REF(CLOSE,2),3,0),COLORBLUE;
 STICKLINE(VAR1A,REF(CLOSE,1),REF(CLOSE,2),0,0),COLOR090FF2;
 PMA:MA(C,5),COLORWHITE,LINETHICK2;
 IF(PMA>REF(PMA,1),PMA,DRAWNULL),COLORRED,LINETHICK2;
 IF(PMA<REF(PMA,1),PMA,DRAWNULL),COLORGREEN,LINETHICK2;
 X:=(3*C+L+O+H)/6;
多空线:(20*X+19*REF(X,1)+18*REF(X,2)+17*REF(X,3)+16*REF(X,4)+15*REF(X,5)+14*REF(X,6) +13*REF(X,7)+12*REF(X,8)+11*REF(X,9)+10*REF(X,10)+9*REF(X,11)+8*REF(X,12) +7*REF(X,13)+6*REF(X,14)+5*REF(X,15)+4*REF(X,16)+3*REF(X,17)+2*REF(X,18)+ REF(X,20))/210,COLORFF00FF,LINETHICK2;
 {用法:黄托底买进,蓝压顶卖出。} DD:=多空线<REF(多空线,1);
 IF(DD,多空线,DRAWNULL),COLOR00FFFF,LINETHICK2;
 A:=(PMA>多空线);
IF(A,多空线,DRAWNULL),COLOR33FF33,POINTDOT,LINETHICK4;
 VAR21:=4*SMA((CLOSE-LLV(LOW,5))/(HHV(HIGH,5)-LLV(LOW,5))*100,5,1)- 3*SMA(SMA((CLOSE-LLV(LOW,5))/(HHV(HIGH,5)-LLV(LOW,5))*100,5,1),3.2,1);
 VAR22:=8;
 QQ:=CROSS(VAR21,VAR22);
 DRAWTEXT(QQ,L*0.98,'短入'),COLOR0099FF;
 YM:=EMA(SLOPE((CLOSE+HIGH+LOW)/3,24)*20+(CLOSE+HIGH+LOW)/3,48),COLORRED,LINETHICK1;
 {IF(EMA((CLOSE+HIGH+LOW)/3,3)>=YM,YM,DRAWNULL),DOTLINE,COLORRED;
 IF(EMA((CLOSE+HIGH+LOW)/3,3)<=YM,YM,DRAWNULL),DOTLINE,COLORGREEN;
 } 买入力度:=LARGEINTRDVOL*100/VOL;
卖出力度:=LARGEOUTTRDVOL*100/VOL;
买卖力度:=买入力度/卖出力度;
MACD价格1:=EMA(CLOSE,3) - EMA(CLOSE,9);
 DEA1021:=EMA((EMA(MACD价格1,102) - EMA(MACD价格1,204)),9);
 DEA511:=EMA((EMA(MACD价格1,51) - EMA(MACD价格1,102)),9);
 DEA36361:=EMA((EMA(MACD价格1,36) - EMA(MACD价格1,72)),9);
 DEA24241:=EMA((EMA(MACD价格1,24) - EMA(MACD价格1,48)),9);
 DEA18181:=EMA((EMA(MACD价格1,18) - EMA(MACD价格1,36)),9);
 DEA661:=EMA((EMA(MACD价格1,6) - EMA(MACD价格1,12)),9);
 DEA331:=EMA((EMA(MACD价格1,3) - EMA(MACD价格1,9)),9);
 DEA12121:=EMA((EMA(MACD价格1,12) - EMA(MACD价格1,24)),9);
 MACD24241:=2*((EMA(MACD价格1,24) - EMA(MACD价格1,48))-DEA24241);
 HH1:=(20*H+19*REF(H,1)+18*REF(H,2)+17*REF(H,3)+16*REF(H,4)+15*REF(H,5)+14*REF(H,6) +13*REF(H,7)+12*REF(H,8)+11*REF(H,9)+10*REF(H,10)+9*REF(H,11)+8*REF(H,12) +7*REF(H,13)+6*REF(H,14)+5*REF(H,15)+4*REF(H,16)+3*REF(H,17)+2*REF(H,18)+ REF(H,20))/210,COLORBLUE,LINETHICK1;
 LL1:=(20*L+19*REF(L,1)+18*REF(L,2)+17*REF(L,3)+16*REF(L,4)+15*REF(L,5)+14*REF(L,6) +13*REF(L,7)+12*REF(L,8)+11*REF(L,9)+10*REF(L,10)+9*REF(L,11)+8*REF(L,12) +7*REF(L,13)+6*REF(L,14)+5*REF(L,15)+4*REF(L,16)+3*REF(L,17)+2*REF(L,18)+ REF(L,20))/210,COLORBLUE,LINETHICK1;
 D90H1:=EMA(HH1,90),COLORRED,LINETHICK1;
 D90L1:=EMA(LL1,90),COLORRED,LINETHICK1;
 D901:=(D90H1+D90L1)/2;
 Y1M:=EMA(SLOPE((CLOSE+HIGH+LOW)/3,24)*20+(CLOSE+HIGH+LOW)/3,48);
 CCI151:=((HIGH+LOW+CLOSE)/3-MA((HIGH+LOW+CLOSE)/3,15))/(0.015*AVEDEV((HIGH+LOW+CLOSE)/3,15));
 CCI101:=((HIGH+LOW+CLOSE)/3-MA((HIGH+LOW+CLOSE)/3,10))/(0.015*AVEDEV((HIGH+LOW+CLOSE)/3,10));
 CCI51:=((HIGH+LOW+CLOSE)/3-MA((HIGH+LOW+CLOSE)/3,5))/(0.015*AVEDEV((HIGH+LOW+CLOSE)/3,5));
 CCI31:=((HIGH+LOW+CLOSE)/3-MA((HIGH+LOW+CLOSE)/3,3))/(0.015*AVEDEV((HIGH+LOW+CLOSE)/3,3));
 CCI买点定位1:=CROSS(CCI51,0) AND CROSS(CCI31,0) AND REF(CCI151,1)>0 AND REF(CCI101,1)>-30 AND REF(CCI151,1)>REF(CCI101,1) AND REF(CCI101,1)>REF(CCI51,1);
 CCI买点定位2:=CROSS(CCI31,0) AND CCI51>REF(CCI51,1) AND REF(CCI51,1)<-100 AND REF(CCI151,1)>0 AND REF(CCI101,1)>-30 AND REF(CCI151,1)>REF(CCI101,1) AND REF(CCI101,1)>REF(CCI51,1);
 CCI买点定位3:=CROSS(CCI51,0) AND CROSS(CCI31,0) AND REF(CCI101,1)>0 AND REF(CCI101,1)>REF(CCI151,1);
 CCI买点定位:=CCI买点定位1=1 OR CCI买点定位2=1 OR CCI买点定位3=1;
金牛1:=CCI买点定位=1 AND DEA12121>DEA18181 AND DEA18181>DEA24241 AND DEA24241>DEA36361 AND DEA36361>DEA511 AND DEA511>=DEA1021 AND DEA18181>REF(DEA18181,1) AND DEA24241>REF(DEA24241,1) AND DEA36361>REF(DEA36361,1) AND DEA511>REF(DEA511,1) AND DEA1021>REF(DEA1021,1) AND DEA36361>0 AND DEA331>0;
金牛2:=CCI买点定位=1 AND DEA12121>DEA18181 AND DEA18181>DEA24241 AND DEA24241>DEA36361 AND DEA18181>DEA1021 AND DEA18181>REF(DEA18181,1) AND DEA24241>REF(DEA24241,1) AND DEA36361>REF(DEA36361,1) AND DEA511>REF(DEA511,1) AND DEA1021>REF(DEA1021,1) AND DEA18181>0 AND DEA331>0;
金牛:=金牛1=1 OR 金牛2=1;
 VOL比:=VOL/REF(VOL,1);
高度:=(D90H1-D90L1)*2+D90H1;
 PBX11:=(EXPMA((CLOSE+HIGH+LOW)/3,4)+EMA((CLOSE+HIGH+LOW)/3,4*2)+EMA((CLOSE+HIGH+LOW)/3,4*4))/3;
 PBX22:=(EXPMA((CLOSE+HIGH+LOW)/3,5)+EMA((CLOSE+HIGH+LOW)/3,5*2)+EMA((CLOSE+HIGH+LOW)/3,5*4))/3;
 PBXHH:=(EXPMA(H,2)+EMA(H,2*2)+EMA(H,2*4))/3,COLORGREEN,LINETHICK1;
 PBXLL:=(EXPMA(L,2)+EMA(L,2*2)+EMA(L,2*4))/3,COLORRED,LINETHICK1;
牛魔王:=(CLOSE+HIGH+LOW)/3>Y1M AND 金牛=1 AND PBX11>PBX22 AND 买卖力度>1 AND C<高度;
STICKLINE(牛魔王=1,LOW,HIGH,0,0),COLORYELLOW;
 STICKLINE(牛魔王=1,CLOSE,OPEN,4.3,0),COLORMAGENTA;
 STICKLINE(牛魔王=1,OPEN,CLOSE,3,0) ,COLOR8E6B23;
 STICKLINE(牛魔王=1,(C+O)/2,C,2,0),COLORYELLOW;
 DRAWICON(牛魔王=1,L*0.99,34);
 DRAWTEXT(牛魔王=1,L*0.99,'----猎杀牛股信号'),COLORRED;
 YM高:=EMA(SLOPE(H,24)*20+H,48),COLORGREEN,DOTLINE;
 YM低:=EMA(SLOPE(L,24)*20+L,48),COLORGREEN,DOTLINE;
止损:=(HIGH+LOW)/2-(YM高-YM低)*1.5;
 STICKLINE(牛魔王=1,止损,止损,100,0),LINETHICK1,COLORWHITE;
 DRAWTEXT(牛魔王=1,止损*0.98,'止损关键价位')COLORGREEN;
 DRAWTEXT_FIX(1,0,0.05,0,'㊣【黄色表示是短线介入信号】'),COLORCYAN;
 DRAWTEXT_FIX(1,0,0.1,0,'㊣【蓝色表示是短线卖出信号】'),COLORCYAN;
 DRAWTEXT_FIX(1,0,0.15,0,'㊣【多彩K线表示牛股猎杀信号】'),COLORCYAN;
 DRAWTEXT_FIX(1,0,0.2,0,'㊣【红色短线持股线,绿色短线持币线】'),COLORCYAN;
 DRAWTEXT_FIX(1,0,0.25,0,'㊣【品红点线中线持股,黄色中线持币线】'),COLORCYAN;
过均必牛:SUM(CLOSE*VOL,FROMOPEN)/SUM(VOL,FROMOPEN),COLORYELLOW,DOTLINE;
 

629333355.jpg

629333355.jpg

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则