通达信《主图之王》源码免费分享
以下是通达信《主图之王》源码,有未来函数,不影响使用,介意者匆下
通达信《主图之王》源码:
{公式名称: 主图之王
公式描述: 常用主图叠加
公式类型: 技术指标公式-未知
画线方法: 主图叠加
公式版本: 0
显示小数: 缺省位数
坐标线位置: 自动
额外Y轴分界: 无
参数精灵:
请设置计算参数:
YL: Param#0 (0.00--1.00)
INFO: Param#1 (0.00--1.00)
JG: Param#2 (0.00--1.00)
ZTL: Param#3 (0.00--1.00)
用法注释:无
公式源码:}
DRAWTEXT_FIX(INFO AND ISLASTBAR,0,0,0,STRCAT(9,HYBLOCK)),COLORYELLOW;
DRAWTEXT_FIX(INFO AND ISLASTBAR,0,0.08,0,STRCAT(10,GNBLOCK)),COLORYELLOW;
DRAWTEXT_FIX(INFO AND ISLASTBAR,0,0.16,0,STRCAT(11,FGBLOCK)),COLORYELLOW;
X_1:=100*CLOSE/LLV(CLOSE,10)-100;
X_2:=100*CLOSE/LLV(CLOSE,30)-100;
X_3:=CLOSE*2;
X_4:=CLOSE*3;
DRAWTEXT_FIX(JG AND ISLASTBAR,0,0.24,0,STRCAT(12,CON2STR(X_1,0))),COLORYELLOW;
DRAWTEXT_FIX(JG AND ISLASTBAR,0,0.32,0,STRCAT(13,CON2STR(X_2,0))),COLORYELLOW;
DRAWTEXT_FIX(JG AND ISLASTBAR,0,0.4,0,STRCAT(14,CON2STR(X_3,3))),COLORYELLOW;
DRAWTEXT_FIX(JG AND ISLASTBAR,0,0.48,0,STRCAT(15,CON2STR(X_4,3))),COLORYELLOW;
X_5:=IF(INBLOCK(16) OR INBLOCK(17),CLOSE/REF(CLOSE,1)>=1.1992,CLOSE/REF(CLOSE,1)>=1.099) AND CLOSE=HIGH;
STICKLINE(X_5,CLOSE,OPEN,4,0),COLORRED;
STICKLINE(X_5,CLOSE,OPEN,3.5,0),COLOR003AFF;
STICKLINE(X_5,CLOSE,OPEN,3,0),COLOR0054FF;
STICKLINE(X_5,CLOSE,OPEN,2.5,0),COLOR007AFF;
STICKLINE(X_5,CLOSE,OPEN,2,0),COLOR008BFF;
STICKLINE(X_5,CLOSE,OPEN,1.5,0),COLOR009CFF;
STICKLINE(X_5,CLOSE,OPEN,1.2,0),COLOR0FC1FF;
STICKLINE(X_5,CLOSE,OPEN,1,0),COLOR21D5FF;
DRAWICON(X_5,LOW*0.99,1);
X_6:=IF(INBLOCK(16) OR INBLOCK(17),100*CLOSE/REF(CLOSE,1)<=81,CLOSE/REF(CLOSE,1)<0.9013) AND CLOSE=LOW;
STICKLINE(X_6,CLOSE,OPEN,4,0),COLORCD5722;
STICKLINE(X_6,CLOSE,OPEN,3.5,0),COLOREBBC12;
STICKLINE(X_6,CLOSE,OPEN,3,0),COLOREFD300;
STICKLINE(X_6,CLOSE,OPEN,2.5,0),COLORD4E600;
STICKLINE(X_6,CLOSE,OPEN,2,0),COLOR9DF600;
STICKLINE(X_6,CLOSE,OPEN,1,0),COLOR4CFF5C;
STICKLINE(X_6,OPEN,CLOSE,1,0),COLORGREEN;
DRAWICON(X_6,HIGH*1.02,2);
MA5:MA(CLOSE,5),COLORWHITE;
MA10:MA(CLOSE,10),COLORYELLOW;
MA20:MA(CLOSE,20),COLORLIBLUE,LINETHICK2;
IF(CLOSE>MA20,MA20,DRAWNULL),COLORRED,LINETHICK2;
MA50:MA(CLOSE,50),COLORMAGENTA;
MA250:MA(CLOSE,250),COLOR524325;
UPPER:MA20+2*STD(CLOSE,20),DOTLINE,COLORFF80FF;
LOWER:MA20-2*STD(CLOSE,20),DOTLINE,COLOR80FF80;
X_7:=HHV(HIGH,120);
X_8:=HHVBARS(HIGH,120);
X_9:=LLV(LOW,X_8+1);
X_10:=LLV(LOW,40)/HHV(HIGH,120)>0.5;
X_11:=HIGH>=HHV(HIGH,250);
X_12:=X_10 OR X_11;
X_13:=100*X_9/X_7>56;
X_14:=X_12 AND X_13;
X_15:=HIGH>=HHV(HIGH,250);
X_16:=X_15 OR LLV(LOW,15)>LLV(LOW,50);
X_17:=LLV(LOW,15)=LLV(LOW,50) AND LLV(LOW,15)>LLV(LOW,100) AND HIGH/HHV(HIGH,250)>0.88;
X_18:=LLV(LOW,15)=LLV(LOW,50) AND LLV(LOW,15)>LLV(LOW,100) AND HIGH/HHV(HIGH,250)>0.75 AND HIGH>=HHV(HIGH,40) AND CLOSE/REF(CLOSE,1)>1.07;
X_19:=X_16 OR X_17 OR X_18;
X_20:=CLOSE>MA(CLOSE,90);
X_21:=MA(CLOSE,90)>=REF(MA(CLOSE,90),5);
X_22:=HIGH>=HHV(HIGH,90);
X_23:=X_20 AND X_21 AND X_22;
X_24:=CLOSE>MA(CLOSE,100);
X_25:=MA(CLOSE,100)>=REF(MA(CLOSE,100),5);
X_26:=HIGH>=HHV(HIGH,100);
X_27:=X_24 AND X_25 AND X_26 AND X_21;
X_28:=CLOSE/MA(CLOSE,120)>1;
X_29:=MA(CLOSE,120)>=REF(MA(CLOSE,120),2);
X_30:=X_28 AND X_29;
X_31:=X_23 OR X_27 OR X_30;
X_32:=VOL=HHV(VOL,10);
X_33:=CLOSE/REF(CLOSE,1)>1.099;
X_34:=VOL/MA(VOL,10)>2;
X_35:=X_32 OR X_33 OR X_34;
X_36:=REF(LOW,1)<=REF(MA(CLOSE,50),1)*1.24 OR REF(LOW,1)<=REF(MA(CLOSE,10),1)*1.03;
X_37:=X_36;
X_38:=CLOSE>REF(CLOSE,1) AND (HIGH-CLOSE)/REF(CLOSE,1)<0.01 AND CLOSE/REF(CLOSE,1)>1.04 AND OPEN<CLOSE;
X_39:=X_14 AND X_19 AND X_31 AND X_35 AND X_37 AND X_38;
DRAWICON(X_39,LOW*0.95,9);
TESTSKIP(PERIOD!=5);
TESTSKIP(BARSCOUNT(CLOSE)<20),NODRAW;
X_40:=INTPART((CLOSE*1.1+0.005)*100)/100;
X_41:=INTPART((CLOSE*1.2+0.005)*100)/100;
X_42:=IF(INBLOCK(16) OR INBLOCK(17),X_41,X_40);
X_43:=MA(CLOSE,20);
X_44:=REF(MA(CLOSE,20),1);
X_45:=INTPART((X_43+(CLOSE-REF(CLOSE,19))/20+0.005)*100)/100;
X_46:=INTPART((X_43+(X_42-REF(CLOSE,19))/20+0.005)*100)/100;
涨停预测:IF(ZTL AND CURRBARSCOUNT<=10,X_42,DRAWNULL),COLOR1133CC,LINETHICK2;
平盘中轨:X_45,NODRAW,COLORGREEN;
涨停中轨:X_46,NODRAW,COLORLIBLUE;
X_47:=22;
X_48:=BARSLAST(HHV(VOL,X_47)=VOL AND VOL>MA(VOL,X_47)*1.5);
X_49:=REF(X_48,1)+1;
X_50:=REF((CLOSE+OPEN+LOW+HIGH)/4,X_49);
DRAWLINE(YL AND X_48=0,(CLOSE+OPEN+LOW+HIGH)/4,YL AND X_48=X_47,X_50,1),COLORGREEN;