K线自定义,和谐源码(通达信公式 主图 源码 测试图)
公式描述: 参数数量: 2参数1: N, 最小: 0, 最大: 1, 缺省: 1参数2: X, 最小: 1, 最大: 10, 缺省: 2, 日线: 1公式类型: 技术指标公式-其他类型画线方法: 主图叠加公式版本: 0显示小数: 缺省位数坐标线位置: 自动额外Y轴分界: 无 参数精灵:请设置计算参数:N: Param#0 (0.00--1.00)X: Param#1 (1.00--10.00)用法注释:无公式源码:}VAR1:=VALUEWHEN(LOW=LLV(LOW,N),LOW);VAR2:=IF(VAR1<REF(VAR1,BARSLAST(VAR1)),VAR1,REF(VAR1,BARSLAST(VAR1)));VAR3:=PLOYLINE(VAR2=REF(VAR2,1) AND REF(VAR2,1)<REF(VAR2,2),REF(LOW,1));VAR4:=DRAWICON(VAR2=REF(VAR2,1) AND REF(VAR2,1)<REF(VAR2,2),REF(LOW,1),36);VAR5:=HOD(CLOSE,N);VAR6:=BARSLAST(VAR5=1);DRAWTEXT(CROSS(1,VAR6),CLOSE,1),NODRAW;DRAWKLINE(HIGH,OPEN,LOW,CLOSE);VAR7:=CLOSE/REF(CLOSE,1)>1.095;STICKLINE(VAR7,OPEN,CLOSE,0.8,0),COLORYELLOW;DRAWTEXT_FIX(1,0,0,0,2),COLOR0080FF;DRAWTEXT_FIX(1,0.07,0,0,HYBLOCK),COLOR0080FF;DRAWTEXT_FIX(1,0.14,0,0,3),COLORYELLOW;DRAWTEXT_FIX(1,0.21,0,0,DYBLOCK),COLORYELLOW;DRAWTEXT_FIX(1,0.28,0,0,4),COLORYELLOW;DRAWTEXT_FIX(1,0.35,0,0,GNBLOCK),COLORYELLOW;DRAWTEXT_FIX(1,0,0.06,0,5),COLORRED;DRAWTEXT_FIX(1,0.07,0.06,0,6),COLORRED;DRAWNUMBER_FIX(1,0.14,0.06,0,FINANCE(34));DRAWTEXT_FIX(1,0.18,0.06,0,7),COLORRED;DRAWNUMBER_FIX(1,0.28,0.06,0,FINANCE(32));DRAWTEXT_FIX(1,0.32,0.06,0,8),COLORRED;DRAWNUMBER_FIX(1,0.4,0.06,0,FINANCE(18));VAR8:=SIGNALS_USER(5,1)*100;VAR9:=STRCAT(STRCAT(9,CON2STR(VAR8,1)),10);DRAWTEXT_FIX(ISLASTBAR,0,0.23,0,VAR9),COLORGREEN;VAR10:=STRCAT(STRCAT(11,CON2STR(VOL/CAPITAL/(1-SIGNALS_USER(5,1))*100,1)),10);DRAWTEXT_FIX(ISLASTBAR,0.2,0.23,0,VAR10),COLORGREEN;VAR11:=STRCAT(12,CON2STR(CLOSE/FINANCE(33),2));VAR12:=STRCAT(13,CON2STR(CLOSE/(FINANCE(20)/FINANCE(1)),2));VAR13:=STRCAT(14,CON2STR(CLOSE/FINANCE(34),2));VAR14:=STRCAT(15,CON2STR(FINANCE(33)/FINANCE(34)*100,2));VAR15:=STRCAT(16,CON2STR((FINANCE(20)-FINANCE(21))/FINANCE(20)*100,2));VAR16:=STRCAT(17,CON2STR(FINANCE(30)/FINANCE(20)*100,2));VAR17:=STRCAT(18,CON2STR(FINANCE(23)/FINANCE(20)*100,2));VAR18:=STRCAT(19,STRCAT(STRCAT(STRCAT(STRCAT(STRCAT(STRCAT(VAR11,VAR12),VAR13),VAR14),VAR15),VAR16),VAR17));VAR19:=(FINANCE(11)-FINANCE(15))/FINANCE(10)*1.2;VAR20:=(FINANCE(31)+FINANCE(17))/FINANCE(10)*1.4;VAR21:=FINANCE(23)/FINANCE(10)*3.3;VAR22:=FINANCE(19)/FINANCE(15)*0.6;VAR23:=FINANCE(20)/FINANCE(15)*0.999;VAR24:=VAR19+VAR20+VAR21+VAR22+VAR23;VAR25:=IF(VAR24<1.2,20,IF(VAR24>=1.2 AND VAR24<2.6,21,22));VAR26:=STRCAT(23,STRCAT(VAR25,STRCAT(24,CON2STR(VAR24,3))));VAR27:=STRCAT(25,CON2STR((FINANCE(19)-FINANCE(22)-FINANCE(27))/FINANCE(19),2));VAR28:=STRCAT(26,CON2STR(FINANCE(25)/FINANCE(15),3));VAR29:=STRCAT(27,STRCAT(STRCAT(VAR26,VAR27),VAR28));DRAWTEXT_FIX(1,0.45,0.06,0,28),COLORGREEN;DRAWNUMBER_FIX(1,0.51,0.06,0,CONST(FINANCE(43))),COLORGREEN;DRAWTEXT_FIX(1,0.55,0.06,0,29),COLORGREEN;DRAWNUMBER_FIX(1,0.61,0.06,0,CONST(FINANCE(44))),COLORGREEN;DRAWTEXT_FIX(ISLASTBAR,0,0.12,0,VAR18),COLOR0080FF;DRAWTEXT_FIX(ISLASTBAR,0,0.17,0,VAR29),COLORGREEN;VAR30:=120;VAR31:=2;VAR32:=1;统计时长:IF(N,CONST(SUMBARS(VOL/FINANCE(7)*100,VAR31)),VAR30),NODRAW;VAR33:=统计时长;VAR34:=CONST(HHV(HIGH,VAR33));VAR35:=CONST(LLV(LOW,VAR33));STICKLINE(CURRBARSCOUNT=VAR33,VAR34,VAR35,0,0);VAR36:=VAR34-VAR35;均价:AMOUNT/VOL/100,NODRAW;VAR37:=VAR35;VAR38:=VAR35*(1+X/10);VAR39:=IF(VAR38<=VAR34,VAR38*(1+X/10),DRAWNULL);VAR40:=IF(VAR39<=VAR34,VAR39*(1+X/10),DRAWNULL);VAR41:=IF(VAR40<=VAR34,VAR40*(1+X/10),DRAWNULL);VAR42:=IF(VAR41<=VAR34,VAR41*(1+X/10),DRAWNULL);VAR43:=IF(VAR42<=VAR34,VAR42*(1+X/10),DRAWNULL);VAR44:=IF(VAR43<=VAR34,VAR43*(1+X/10),DRAWNULL);VAR45:=IF(VAR44<=VAR34,VAR44*(1+X/10),DRAWNULL);VAR46:=IF(VAR45<=VAR34,VAR45*(1+X/10),DRAWNULL);VAR47:=IF(VAR46<=VAR34,VAR46*(1+X/10),DRAWNULL);VAR48:=IF(VAR47<=VAR34,VAR47*(1+X/10),DRAWNULL);VAR49:=IF(VAR48<=VAR34,VAR48*(1+X/10),DRAWNULL);VAR50:=IF(VAR49<=VAR34,VAR49*(1+X/10),DRAWNULL);VAR51:=IF(VAR50<=VAR34,VAR50*(1+X/10),DRAWNULL);VAR52:=IF(VAR51<=VAR34,VAR51*(1+X/10),DRAWNULL);VAR53:=IF(VAR52<=VAR34,VAR52*(1+X/10),DRAWNULL);VAR54:=IF(VAR53<=VAR34,VAR53*(1+X/10),DRAWNULL);VAR55:=IF(VAR54<=VAR34,VAR54*(1+X/10),DRAWNULL);VAR56:=IF(VAR55<=VAR34,VAR55*(1+X/10),DRAWNULL);VAR57:=IF(VAR56<=VAR34,VAR56*(1+X/10),DRAWNULL);VAR58:=IF(VAR57<=VAR34,VAR57*(1+X/10),DRAWNULL);VAR59:=IF(VAR58<=VAR34,VAR58*(1+X/10),DRAWNULL);VAR60:=IF(VAR59<=VAR34,VAR59*(1+X/10),DRAWNULL);VAR61:=IF(VAR60<=VAR34,VAR60*(1+X/10),DRAWNULL);VAR62:=IF(VAR61<=VAR34,VAR61*(1+X/10),DRAWNULL);VAR63:=IF(VAR62<=VAR34,VAR62*(1+X/10),DRAWNULL);VAR64:=IF(VAR63<=VAR34,VAR63*(1+X/10),DRAWNULL);VAR65:=IF(VAR64<=VAR34,VAR64*(1+X/10),DRAWNULL);VAR66:=IF(VAR65<=VAR34,VAR65*(1+X/10),DRAWNULL);VAR67:=IF(VAR66<=VAR34,VAR66*(1+X/10),DRAWNULL);VAR68:=IF(VAR67<=VAR34,VAR67*(1+X/10),DRAWNULL);VAR69:=IF(VAR68<=VAR34,VAR68*(1+X/10),DRAWNULL);VAR70:=IF(VAR69<=VAR34,VAR69*(1+X/10),DRAWNULL);VAR71:=IF(VAR70<=VAR34,VAR70*(1+X/10),DRAWNULL);VAR72:=IF(VAR71<=VAR34,VAR71*(1+X/10),DRAWNULL);VAR73:=SUM((CURRBARSCOUNT<VAR33+1)*VOL,VAR33);www70822com:DRAWNULL,COLORRED;VAR74:=SUM((CURRBARSCOUNT<VAR33+1 AND RANGE(均价,VAR37-0.001,VAR38+0.001))*VOL,VAR33)/VAR73;STICKLINE(CURRBARSCOUNT<CONST(INTPART(VAR74*200)),VAR37,VAR37*1.001,5,0),COLORFF5555;VAR75:=SUM((CURRBARSCOUNT<VAR33+1 AND RANGE(均价,VAR38,VAR39+0.001))*VOL,VAR33)/VAR73;STICKLINE(CURRBARSCOUNT<CONST(INTPART(VAR75*200)),VAR38,VAR38*1.001,5,0),COLORFFAA55;VAR76:=SUM((CURRBARSCOUNT<VAR33+1 AND RANGE(均价,VAR39,VAR40+0.001))*VOL,VAR33)/VAR73;STICKLINE(CURRBARSCOUNT<CONST(INTPART(VAR76*200)),VAR39,VAR39*1.001,5,0),COLORAAFF55;VAR77:=SUM((CURRBARSCOUNT<VAR33+1 AND RANGE(均价,VAR40,VAR41+0.001))*VOL,VAR33)/VAR73;STICKLINE(CURRBARSCOUNT<CONST(INTPART(VAR77*200)),VAR40,VAR40*1.001,5,0),COLOR5FFF00;VAR78:=SUM((CURRBARSCOUNT<VAR33+1 AND RANGE(均价,VAR41,VAR42+0.001))*VOL,VAR33)/VAR73;STICKLINE(CURRBARSCOUNT<CONST(INTPART(VAR78*200)),VAR41,VAR41*1.001,5,0),COLORFFFFF0;VAR79:=SUM((CURRBARSCOUNT<VAR33+1 AND RANGE(均价,VAR42,VAR43+0.001))*VOL,VAR33)/VAR73;STICKLINE(CURRBARSCOUNT<CONST(INTPART(VAR79*200)),VAR42,VAR42*1.001,5,0),COLORFF0FFF;VAR80:=SUM((CURRBARSCOUNT<VAR33+1 AND RANGE(均价,VAR43,VAR44+0.001))*VOL,VAR33)/VAR73;STICKLINE(CURRBARSCOUNT<CONST(INTPART(VAR80*200)),VAR43,VAR43*1.001,5,0),COLOR509FDD;VAR81:=SUM((CURRBARSCOUNT<VAR33+1 AND RANGE(均价,VAR44,VAR45+0.001))*VOL,VAR33)/VAR73;STICKLINE(CURRBARSCOUNT<CONST(INTPART(VAR81*200)),VAR44,VAR44*1.001,5,0),COLORAA5DDD;VAR82:=SUM((CURRBARSCOUNT<VAR33+1 AND RANGE(均价,VAR45,VAR46+0.001))*VOL,VAR33)/VAR73;STICKLINE(CURRBARSCOUNT<CONST(INTPART(VAR82*200)),VAR45,VAR45*1.001,5,0),COLOR0055DD;VAR83:=SUM((CURRBARSCOUNT<VAR33+1 AND RANGE(均价,VAR46,VAR47+0.001))*VOL,VAR33)/VAR73;STICKLINE(CURRBARSCOUNT<CONST(INTPART(VAR83*200)),VAR46,VAR46*1.001,5,0);VAR84:=SUM((CURRBARSCOUNT<VAR33+1 AND RANGE(均价,VAR47,VAR48+0.001))*VOL,VAR33)/VAR73;STICKLINE(CURRBARSCOUNT<CONST(INTPART(VAR84*200)),VAR47,VAR47*1.001,5,0);VAR85:=SUM((CURRBARSCOUNT<VAR33+1 AND RANGE(均价,VAR48,VAR49+0.001))*VOL,VAR33)/VAR73;STICKLINE(CURRBARSCOUNT<CONST(INTPART(VAR85*200)),VAR48,VAR48*1.001,5,0);VAR86:=SUM((CURRBARSCOUNT<VAR33+1 AND RANGE(均价,VAR49,VAR50+0.001))*VOL,VAR33)/VAR73;STICKLINE(CURRBARSCOUNT<CONST(INTPART(VAR86*200)),VAR49,VAR49*1.001,5,0);VAR87:=SUM((CURRBARSCOUNT<VAR33+1 AND RANGE(均价,VAR50,VAR51+0.001))*VOL,VAR33)/VAR73;STICKLINE(CURRBARSCOUNT<CONST(INTPART(VAR87*200)),VAR50,VAR50*1.001,5,0);VAR88:=SUM((CURRBARSCOUNT<VAR33+1 AND RANGE(均价,VAR51,VAR52+0.001))*VOL,VAR33)/VAR73;STICKLINE(CURRBARSCOUNT<CONST(INTPART(VAR88*200)),VAR51,VAR51*1.001,5,0);VAR89:=SUM((CURRBARSCOUNT<VAR33+1 AND RANGE(均价,VAR52,VAR53+0.001))*VOL,VAR33)/VAR73;STICKLINE(CURRBARSCOUNT<CONST(INTPART(VAR89*200)),VAR52,VAR52*1.001,5,0);VAR90:=SUM((CURRBARSCOUNT<VAR33+1 AND RANGE(均价,VAR53,VAR54+0.001))*VOL,VAR33)/VAR73;STICKLINE(CURRBARSCOUNT<CONST(INTPART(VAR90*200)),VAR53,VAR53*1.001,5,0);VAR91:=SUM((CURRBARSCOUNT<VAR33+1 AND RANGE(均价,VAR54,VAR55+0.001))*VOL,VAR33)/VAR73;STICKLINE(CURRBARSCOUNT<CONST(INTPART(VAR91*200)),VAR54,VAR54*1.001,5,0);VAR92:=SUM((CURRBARSCOUNT<VAR33+1 AND RANGE(均价,VAR55,VAR56+0.001))*VOL,VAR33)/VAR73;STICKLINE(CURRBARSCOUNT<CONST(INTPART(VAR92*200)),VAR55,VAR55*1.001,5,0);VAR93:=SUM((CURRBARSCOUNT<VAR33+1 AND RANGE(均价,VAR56,VAR57+0.001))*VOL,VAR33)/VAR73;STICKLINE(CURRBARSCOUNT<CONST(INTPART(VAR93*200)),VAR56,VAR56*1.001,5,0);VAR94:=SUM((CURRBARSCOUNT<VAR33+1 AND RANGE(均价,VAR57,VAR58+0.001))*VOL,VAR33)/VAR73;STICKLINE(CURRBARSCOUNT<CONST(INTPART(VAR94*200)),VAR57,VAR57*1.001,5,0);VAR95:=SUM((CURRBARSCOUNT<VAR33+1 AND RANGE(均价,VAR58,VAR59+0.001))*VOL,VAR33)/VAR73;STICKLINE(CURRBARSCOUNT<CONST(INTPART(VAR95*200)),VAR58,VAR58*1.001,5,0);VAR96:=SUM((CURRBARSCOUNT<VAR33+1 AND RANGE(均价,VAR59,VAR60+0.001))*VOL,VAR33)/VAR73;STICKLINE(CURRBARSCOUNT<CONST(INTPART(VAR96*200)),VAR59,VAR59*1.001,5,0);VAR97:=SUM((CURRBARSCOUNT<VAR33+1 AND RANGE(均价,VAR60,VAR61+0.001))*VOL,VAR33)/VAR73;STICKLINE(CURRBARSCOUNT<CONST(INTPART(VAR97*200)),VAR60,VAR60*1.001,5,0);VAR98:=SUM((CURRBARSCOUNT<VAR33+1 AND RANGE(均价,VAR61,VAR62+0.001))*VOL,VAR33)/VAR73;STICKLINE(CURRBARSCOUNT<CONST(INTPART(VAR98*200)),VAR61,VAR61*1.001,5,0);VAR99:=SUM((CURRBARSCOUNT<VAR33+1 AND RANGE(均价,VAR62,VAR63+0.001))*VOL,VAR33)/VAR73;STICKLINE(CURRBARSCOUNT<CONST(INTPART(VAR99*200)),VAR62,VAR62*1.001,5,0);VAR100:=SUM((CURRBARSCOUNT<VAR33+1 AND RANGE(均价,VAR63,VAR64+0.001))*VOL,VAR33)/VAR73;STICKLINE(CURRBARSCOUNT<CONST(INTPART(VAR100*200)),VAR63,VAR63*1.001,5,0);VAR101:=SUM((CURRBARSCOUNT<VAR33+1 AND RANGE(均价,VAR64,VAR65+0.001))*VOL,VAR33)/VAR73;STICKLINE(CURRBARSCOUNT<CONST(INTPART(VAR101*200)),VAR64,VAR64*1.001,5,0);VAR102:=SUM((CURRBARSCOUNT<VAR33+1 AND RANGE(均价,VAR65,VAR66+0.001))*VOL,VAR33)/VAR73;STICKLINE(CURRBARSCOUNT<CONST(INTPART(VAR102*200)),VAR65,VAR65*1.001,5,0);VAR103:=SUM((CURRBARSCOUNT<VAR33+1 AND RANGE(均价,VAR66,VAR67+0.001))*VOL,VAR33)/VAR73;STICKLINE(CURRBARSCOUNT<CONST(INTPART(VAR103*200)),VAR66,VAR66*1.001,5,0);VAR104:=SUM((CURRBARSCOUNT<VAR33+1 AND RANGE(均价,VAR67,VAR68+0.001))*VOL,VAR33)/VAR73;STICKLINE(CURRBARSCOUNT<CONST(INTPART(VAR104*200)),VAR67,VAR67*1.001,5,0);VAR105:=SUM((CURRBARSCOUNT<VAR33+1 AND RANGE(均价,VAR68,VAR69+0.001))*VOL,VAR33)/VAR73;STICKLINE(CURRBARSCOUNT<CONST(INTPART(VAR105*200)),VAR68,VAR68*1.001,5,0);VAR106:=SUM((CURRBARSCOUNT<VAR33+1 AND RANGE(均价,VAR69,VAR70+0.001))*VOL,VAR33)/VAR73;STICKLINE(CURRBARSCOUNT<CONST(INTPART(VAR106*200)),VAR69,VAR69*1.001,5,0);VAR107:=SUM((CURRBARSCOUNT<VAR33+1 AND RANGE(均价,VAR70,VAR71+0.001))*VOL,VAR33)/VAR73;STICKLINE(CURRBARSCOUNT<CONST(INTPART(VAR107*200)),VAR70,VAR70*1.001,5,0);VAR108:=SUM((CURRBARSCOUNT<VAR33+1 AND RANGE(均价,VAR71,VAR72+0.001))*VOL,VAR33)/VAR73;STICKLINE(CURRBARSCOUNT<CONST(INTPART(VAR108*200)),VAR71,VAR71*1.001,5,0);
找了很久的东西! thanks for the sharing! 找到好贴不容易,我顶你了,谢了
页:
[1]