「翔博精选指标」太极趋(黑)(通达信公式 主图 源码 测试图)
2022-02-28原创 编 辑:翔博软件
{公式名称: 太极趋(黑)
公式描述:
无参数
公式类型: 技术指标公式-其他类型
画线方法: 主图叠加
公式版本: 0
显示小数: 缺省位数
坐标线位置: 自动
额外Y轴分界: 无
公式源码:}
到期日期:2129123299,NODRAW;
VAR1:=1+19000000;
VAR2:=IF(VAR1<=到期日期,1,0);
DRAWTEXT(VAR2=0 AND REF(VAR2=1,1),HIGH,1),COLORRED;
VAR3:=IF(PERIOD<=1,42,IF(PERIOD<=2,35,IF(PERIOD<=4,28,IF(PERIOD<=5,21,IF(PERIOD<=6,14,7)))));
VAR4:=IF(PERIOD<=1,63,IF(PERIOD<=2,63,IF(PERIOD<=4,63,IF(PERIOD<=5,49,IF(PERIOD<=6,21,14)))));
VAR5:=IF(PERIOD<=1,9,IF(PERIOD<=2,7,IF(PERIOD<=4,2,IF(PERIOD<=5,1,IF(PERIOD<=6,1,1)))));
VAR6:=IF(PERIOD<=1,5,IF(PERIOD<=2,4,IF(PERIOD<=4,3,IF(PERIOD<=5,3,IF(PERIOD<=6,2,1)))));
VAR7:=IF(PERIOD<=1,35,IF(PERIOD<=2,28,IF(PERIOD<=4,21,IF(PERIOD<=5,14,IF(PERIOD<=6,7,5)))));
VAR8:=0.144;
VAR9:=1;
VAR10:=0;
VAR11:=(-1);
VAR12:=(HIGH+LOW+CLOSE)/3;
VAR13:=MAX(MAX(HIGH-LOW,ABS(REF(CLOSE,1)-HIGH)),ABS(REF(CLOSE,1)-LOW));
VAR14:=EMA(VAR13,VAR3);
VAR15:=BARSLAST(BARSTATUS=1);
VAR16:=ABS(VAR12-REF(VAR12,VAR4));
VAR17:=SUM(ABS(VAR12-REF(VAR12,1)),VAR4);
VAR18:=VAR16/VAR17;
VAR19:=2/(2+1);
VAR20:=2/(21+1);
VAR21:=VAR18*(VAR19-VAR20)+VAR20;
VAR22:=VAR21*VAR21;
VAR23:=REF(EMA(VAR12,VAR4),1)+VAR22*(VAR12-REF(EMA(VAR12,VAR4),1));
VAR24:=EMA(HHV(HIGH,VAR5),VAR3);
VAR25:=EMA(LLV(LOW,VAR5),VAR3);
VAR26:=VAR23;
VAR27:=0.4;
VAR28:=1;
VAR29:=2;
VAR30:=3;
VAR31:=5;
VAR32:=8;
VAR33:=13;
VAR34:=21;
VAR35:=28;
VAR36:=100;
VAR37:=IF(VAR15>=VAR36,VAR36,MIN(10,VAR15));
VAR38:=SLOPE(VAR26,3);
VAR39:=REF(VAR38>0,1) AND VAR38<0 OR (REF(VAR38<0,1) AND VAR38>0);
VAR40:=COUNT(VAR39,VAR37);
VAR41:=COUNT(ABS(VAR38)>=VAR27,VAR37);
VAR42:=COUNT(ABS(VAR38)>=VAR28,VAR37);
VAR43:=COUNT(ABS(VAR38)>=VAR29,VAR37);
VAR44:=COUNT(ABS(VAR38)>=VAR30,VAR37);
VAR45:=COUNT(ABS(VAR38)>=VAR31,VAR37);
VAR46:=COUNT(ABS(VAR38)>=VAR32,VAR37);
VAR47:=COUNT(ABS(VAR38)>=VAR33,VAR37);
VAR48:=COUNT(ABS(VAR38)>=VAR34,VAR37);
VAR49:=COUNT(ABS(VAR38)>=VAR35,VAR37);
VAR50:=VAR36*0.35;
VAR51:=VAR40;
VAR52:=IF(VAR41>=VAR51 AND VAR41<=VAR50,VAR27,IF(VAR42>=VAR51 AND VAR42<=VAR50,VAR28,IF(VAR43>=VAR51 AND VAR43<=VAR50,VAR29,IF(VAR44>=VAR51 AND VAR44<=VAR50,VAR30,IF(VAR45>=VAR51 AND VAR45<=VAR50,VAR31,IF(VAR46>=VAR51 AND VAR46<=VAR50,VAR32,IF(VAR47>=VAR51 AND VAR47<=VAR50,VAR33,IF(VAR48>=VAR51 AND VAR48<=VAR50,VAR34,IF(VAR49>=VAR51 AND VAR49<=VAR50,VAR35,0.1)))))))));
VAR53:=STD(HIGH,VAR3);
VAR54:=STD(LOW,VAR3);
VAR55:=VAR24+VAR53;
VAR56:=VAR25-VAR54;
VAR57:=VAR55-VAR56;
VAR58:=VAR57*VAR8;
VAR59:=VAR55-VAR58;
VAR60:=VAR56+VAR58;
VAR61:=EMA(VAR12,VAR3);
VAR62:=VAR55+VAR58;
VAR63:=VAR56-VAR58;
波高:VAR59*VAR2,DOTLINE,COLORWHITE;
波低:VAR60*VAR2,DOTLINE,COLORWHITE;
趋势线:VAR26*VAR2,COLORYELLOW,LINETHICK3;
VAR64:=6;
VAR65:=VAR55>REF(VAR55,1);
VAR66:=VAR56>REF(VAR56,1);
VAR67:=VAR26>REF(VAR26,1);
VAR68:=VAR55<REF(VAR55,1);
VAR69:=VAR56<REF(VAR56,1);
VAR70:=VAR26<REF(VAR26,1);
VAR71:=COUNT(VAR65,VAR64);
VAR72:=COUNT(VAR66,VAR64);
VAR73:=COUNT(VAR67,VAR64);
VAR74:=COUNT(VAR68,VAR64);
VAR75:=COUNT(VAR69,VAR64);
VAR76:=COUNT(VAR70,VAR64);
VAR77:=IF(VAR71>VAR74,VAR9,IF(VAR74>VAR71,VAR11,VAR10));
VAR78:=IF(VAR72>VAR75,VAR9,IF(VAR75>VAR72,VAR11,VAR10));
VAR79:=IF(VAR73>VAR76,VAR9,IF(VAR76>VAR73,VAR11,VAR10));
VAR80:=VAR77+VAR78+VAR79;
VAR81:=VAR80>0;
VAR82:=VAR80<0;
VAR83:=2;
VAR84:=4;
VAR85:=SLOPE(VAR55,VAR83);
VAR86:=SLOPE(VAR56,VAR83);
VAR87:=SLOPE(VAR61,VAR83);
VAR88:=SLOPE(VAR26,VAR83);
VAR89:=(VAR85+VAR86+VAR88)/3;
VAR90:=VAR85>0;
VAR91:=VAR88>0;
VAR92:=VAR87>0;
VAR93:=VAR86>0;
VAR94:=VAR85<0;
VAR95:=VAR88<0;
VAR96:=VAR87<0;
VAR97:=VAR86<0;
VAR98:=COUNT(VAR90,VAR84);
VAR99:=COUNT(VAR91,VAR84);
VAR100:=COUNT(VAR92,VAR84);
VAR101:=COUNT(VAR93,VAR84);
VAR102:=COUNT(VAR94,VAR84);
VAR103:=COUNT(VAR95,VAR84);
VAR104:=COUNT(VAR96,VAR84);
VAR105:=COUNT(VAR97,VAR84);
VAR106:=IF(VAR98>VAR102,VAR9,IF(VAR102>VAR98,VAR11,VAR10));
VAR107:=IF(VAR101>VAR105,VAR9,IF(VAR105>VAR101,VAR11,VAR10));
VAR108:=IF(VAR99>VAR103,VAR9,IF(VAR103>VAR99,VAR11,VAR10));
VAR109:=IF(VAR100>VAR104,VAR9,IF(VAR104>VAR100,VAR11,VAR10));
VAR110:=VAR106+VAR107+VAR108;
VAR111:=VAR106+VAR107+VAR109;
VAR112:=VAR110>0;
VAR113:=VAR110<0;
VAR114:=VAR111>0;
VAR115:=VAR111<0;
VAR116:=IF(VAR15>=VAR3,VAR3,MIN(10,VAR15));
VAR117:=VAR88>=VAR52;
VAR118:=VAR88<=0-VAR52;
VAR119:=VAR88<VAR52 AND VAR88>0-VAR52;
VAR120:=COUNT(VAR117,VAR116);
VAR121:=COUNT(VAR118,VAR116);
VAR122:=COUNT(VAR119,VAR116);
VAR123:=VAR120/VAR116*100;
VAR124:=VAR121/VAR116*100;
VAR125:=VAR122/VAR116*100;
VAR126:=CROSS(VAR26,VAR60);
VAR127:=BARSLAST(VAR126);
VAR128:=CROSS(VAR59,VAR26);
VAR129:=BARSLAST(VAR128);
VAR130:=VAR117 OR VAR124<=35;
VAR131:=VAR118 OR VAR123<=35;
VAR132:=IF(VAR60>=VAR26 OR VAR59<=VAR26,VAR114 AND VAR108>0,VAR112) AND VAR130;
VAR133:=IF(VAR59<=VAR26 OR VAR60>=VAR26,VAR115 AND VAR108<0,VAR113) AND VAR131;
VAR134:=NOT(VAR132) AND NOT(VAR133);
VAR135:=REF(NOT(VAR132),1) AND VAR132;
VAR136:=REF(NOT(VAR133),1) AND VAR133;
NOTEXT1:IF(VAR132*VAR2,VAR26,DRAWNULL),COLORRED,LINETHICK3;
NOTEXT2:IF(VAR133*VAR2,VAR26,DRAWNULL),COLORGREEN,LINETHICK3;
VAR137:=BARSLAST(VAR132);
VAR138:=REF(VAR137,VAR137+1)+1+VAR137;
VAR139:=REF(VAR137,VAR138+1)+1+VAR138+VAR137;
VAR140:=BARSLAST(VAR133);
VAR141:=REF(VAR140,VAR140+1)+1+VAR140;
VAR142:=REF(VAR140,VAR141+1)+1+VAR141+VAR140;
VAR143:=28;
VAR144:=HHV(VAR88,VAR143);
VAR145:=REF(HHV(VAR88,VAR143),VAR140);
VAR146:=REF(HHV(VAR88,VAR143),VAR141);
VAR147:=REF(HHV(VAR88,VAR143),VAR142);
VAR148:=LLV(VAR88,VAR143);
VAR149:=REF(LLV(VAR88,VAR143),VAR137);
VAR150:=REF(LLV(VAR88,VAR143),VAR138);
VAR151:=REF(LLV(VAR88,VAR143),VAR139);
VAR152:=IF(IF(VAR145=DRAWNULL,1,0),VAR144,IF(IF(VAR146=DRAWNULL,1,0),MAX(VAR144,VAR145),MAX(VAR146,MAX(VAR144,VAR145))));
VAR153:=IF(IF(VAR149=DRAWNULL,1,0),VAR148,IF(IF(VAR150=DRAWNULL,1,0),MIN(VAR148,VAR149),MIN(VAR150,MIN(VAR148,VAR149))));
VAR154:=MAX(VAR152,ABS(VAR153));
VAR155:=MAX(VAR154,0.1);
VAR156:=MIN(0-VAR154,(-0.1));
VAR157:=VAR155*0.95;
VAR158:=VAR156*0.95;
VAR159:=VAR88>=VAR157;
VAR160:=VAR88<=VAR158;
VAR161:=REF(NOT(VAR159),1) AND VAR159;
VAR162:=REF(NOT(VAR160),1) AND VAR160;
VAR163:=REF(VAR159,1) AND NOT(VAR159);
VAR164:=REF(VAR160,1) AND NOT(VAR160);
VAR165:=BARSLAST(VAR163);
VAR166:=BARSLAST(VAR164);
VAR167:=3;
VAR168:=LOW<=VAR56;
VAR169:=HIGH>=VAR55;
VAR170:=BARSLAST(VAR168);
VAR171:=BARSLAST(VAR169);
VAR172:=CROSS(CLOSE,VAR26) AND VAR170<=VAR167 AND COUNT(CROSS(CLOSE,VAR26),VAR167)<=1 OR (VAR170=VAR167 AND EVERY(LOW>VAR56,VAR167-1) AND EVERY(CLOSE<VAR26,VAR167));
VAR173:=BARSLAST(VAR172);
VAR174:=IF(VAR172,REF(VAR173,1)+1,REF(VAR173,VAR173+1)+1+VAR173);
VAR175:=IF(VAR172,REF(VAR174,1)+1,REF(VAR173,VAR174+1)+1+VAR174);
VAR176:=IF(VAR172,REF(VAR175,1)+1,REF(VAR173,VAR175+1)+1+VAR175);
VAR177:=CROSS(VAR26,CLOSE) AND VAR171<=VAR167 AND COUNT(CROSS(VAR26,CLOSE),VAR167)<=1 OR (VAR171=VAR167 AND EVERY(HIGH<VAR55,VAR167-1) AND EVERY(CLOSE>VAR26,VAR167));
VAR178:=BARSLAST(VAR177);
VAR179:=IF(VAR177,REF(VAR178,1)+1,REF(VAR178,VAR178+1)+1+VAR178);
VAR180:=IF(VAR177,REF(VAR179,1)+1,REF(VAR178,VAR179+1)+1+VAR179);
VAR181:=IF(VAR177,REF(VAR180,1)+1,REF(VAR178,VAR180+1)+1+VAR180);
VAR182:=REF(VAR170,VAR173)+VAR173;
VAR183:=REF(VAR171,VAR178)+VAR178;
VAR184:=REF(LLV(LOW,5),VAR182);
VAR185:=REF(VAR184,VAR174);
VAR186:=REF(VAR184,VAR175);
VAR187:=REF(VAR184,VAR176);
VAR188:=REF(HHV(HIGH,5),VAR183);
VAR189:=REF(VAR188,VAR179);
VAR190:=REF(VAR188,VAR180);
VAR191:=REF(VAR188,VAR181);
VAR192:=VAR174<=VAR3*2 AND ABS(VAR184-VAR185)<=VAR54;
VAR193:=IF(REF(VAR192,VAR175) AND REF(VAR192,VAR174) AND REF(VAR192,VAR173),VAR187,IF(REF(VAR192,VAR174) AND REF(VAR192,VAR173),VAR186,IF(REF(VAR192,VAR173),VAR185,VAR184)));
VAR194:=IF(VAR193=VAR187,VAR176,IF(VAR193=VAR186,VAR175,IF(VAR193=VAR185,VAR174,VAR173)));
VAR195:=REF(VAR193,VAR194+1);
VAR196:=VAR179<=VAR3*2 AND ABS(VAR188-VAR189)<=VAR53;
VAR197:=IF(REF(VAR196,VAR180) AND REF(VAR196,VAR179) AND REF(VAR196,VAR178),VAR191,IF(REF(VAR196,VAR179) AND REF(VAR196,VAR178),VAR190,IF(REF(VAR196,VAR178),VAR189,VAR188)));
VAR198:=IF(VAR197=VAR191,VAR181,IF(VAR197=VAR190,VAR180,IF(VAR197=VAR189,VAR179,VAR178)));
VAR199:=REF(VAR197,VAR198+1);
VAR200:=ABS(VAR197-VAR193);
VAR201:=VAR193-VAR195;
VAR202:=VAR197-VAR199;
VAR203:=VAR201/VAR195*100;
VAR204:=LLV(VAR203,200);
VAR205:=VAR202/VAR199*100;
VAR206:=HHV(VAR205,200);
VAR207:=VAR200/VAR14;
VAR208:=VAR201/VAR14;
VAR209:=VAR202/VAR14;
VAR210:=VAR201/VAR54;
VAR211:=VAR202/VAR53;
STICKLINE(VAR193=REF(VAR193,1) AND VAR193*VAR2,VAR193,VAR193,1,0),COLORGREEN;
STICKLINE(VAR197=REF(VAR197,1) AND VAR197*VAR2,VAR197,VAR197,1,0),COLORRED;
VAR212:=CROSS(VAR59,CLOSE) OR (CLOSE<VAR59 AND MAX(HIGH,REF(CLOSE,1))>=VAR59);
VAR213:=CROSS(CLOSE,VAR60) OR (CLOSE>VAR60 AND MIN(LOW,REF(CLOSE,1))<=VAR60);
VAR214:=CROSS(CLOSE,VAR62) OR (CLOSE>VAR62 AND MIN(LOW,REF(CLOSE,1))<=VAR62);
VAR215:=CROSS(VAR63,CLOSE) OR (CLOSE<VAR63 AND MAX(HIGH,REF(CLOSE,1))>=VAR63);
VAR216:=CROSS(VAR26,CLOSE) OR (CLOSE<VAR26 AND MAX(HIGH,REF(CLOSE,1))>=VAR26);
VAR217:=CROSS(CLOSE,VAR26) OR (CLOSE>VAR26 AND MIN(LOW,REF(CLOSE,1))<=VAR26);
VAR218:=CROSS(CLOSE,VAR197) OR (CLOSE>VAR197 AND MIN(LOW,REF(CLOSE,1))<=VAR197);
VAR219:=CROSS(VAR193,CLOSE) OR (CLOSE<VAR193 AND MAX(HIGH,REF(CLOSE,1))>=VAR193);
VAR220:=CROSS(VAR197,CLOSE) OR (CLOSE<VAR197 AND MAX(HIGH,REF(CLOSE,1))>=VAR197);
VAR221:=CROSS(CLOSE,VAR193) OR (CLOSE>VAR193 AND MIN(LOW,REF(CLOSE,1))<=VAR193);
VAR222:=CROSS(CLOSE,VAR195) AND (CLOSE>VAR195 AND MIN(LOW,REF(CLOSE,1))<=VAR195);
VAR223:=CROSS(VAR199,CLOSE) AND (CLOSE<VAR199 AND MAX(HIGH,REF(CLOSE,1))>=VAR199);
VAR224:=EVERY(CLOSE<VAR59,VAR7);
VAR225:=EVERY(CLOSE>VAR60,VAR7);
VAR226:=ABS(REF(CLOSE-OPEN,1))/2+REF(CLOSE,1);
VAR227:=VAR226<=VAR193;
VAR228:=VAR226>=VAR197;
VAR229:=VAR219 AND (VAR133 OR VAR26>VAR61) AND OPEN<REF(CLOSE,1) AND HIGH<VAR193;
VAR230:=VAR218 AND (VAR132 OR VAR26<VAR61) AND OPEN>REF(CLOSE,1) AND LOW>VAR197;
VAR231:=VAR219 AND VAR207>=VAR6 AND (VAR133 OR VAR26>VAR61);
VAR232:=VAR218 AND VAR207>=VAR6 AND (VAR132 OR VAR26<VAR61);
VAR233:=REF(VAR231,1) OR VAR229 AND OPEN<VAR193;
VAR234:=REF(VAR232,1) OR VAR230 AND OPEN>VAR197;
VAR235:=VAR233 AND COUNT(VAR233,VAR173+1)<=1;
VAR236:=VAR234 AND COUNT(VAR234,VAR178+1)<=1;
DRAWICON(VAR235*VAR2,VAR26,2);
DRAWICON(VAR236*VAR2,VAR26,1);
VAR237:=CROSS(VAR59,VAR26);
VAR238:=BARSLAST(VAR237);
VAR239:=CROSS(VAR26,VAR60);
VAR240:=BARSLAST(VAR239);
VAR241:=CROSS(VAR61,VAR26);
VAR242:=CROSS(VAR26,VAR61);
VAR243:=VAR241 AND COUNT(VAR241,VAR238)<=1;
VAR244:=VAR242 AND COUNT(VAR242,VAR240)<=1;
DRAWICON(VAR243*VAR2,VAR60,36);
DRAWICON(VAR244*VAR2,VAR59,37);
.......
部分源码省略,请下载导入公式
DRAWICON(VAR256*VAR2,MIN(LOW,VAR60),38);
DRAWICON(VAR257*VAR2,MAX(HIGH,VAR59),39);