《筹码分布主图指标通达信指标公式源码.docx》由会员分享,可在线阅读,更多相关《筹码分布主图指标通达信指标公式源码.docx(13页珍藏版)》请在淘文阁 - 分享文档赚钱的网站上搜索。
1、筹码分布主图指标通达信指标公式源码XA_1:=400;XA_2:=90;XA_3:=79;XA_4:=IF(XA_210,10,XA_3);XA_5:=CURRBARSCOUNT;XA_6:=REF(HIGH,XA_2)=HHV(HIGH,2*XA_2+1);XA_7:=BACKSET(XA_6,XA_2+1);XA_8:=FILTER(XA_7,XA_2)ANDHIGH=HHV(HIGH,XA_2+1);XA_9:=BARSLAST(XA_8);XA_10:=IF(XA_8,XA_5,0);XA_11:=IF(XA_9,REF(HIGH,XA_9),HIGH);XA_12:=IF(XA_9,
2、REF(XA_10,XA_9),XA_10);XA_13:=REF(XA_11,XA_9+1);XA_14:=CONST(XA_12);XA_15:=REF(XA_12,XA_9+1);XA_16:=CONST(XA_15);XA_17:=REF(LOW,XA_2)=LLV(LOW,2*XA_2+1);XA_18:=BACKSET(XA_17,XA_2+1);XA_19:=FILTER(XA_18,XA_2)ANDLOW=LLV(LOW,XA_2+1);XA_20:=BARSLAST(XA_19);XA_21:=IF(XA_19,XA_5,0);XA_22:=IF(XA_20,REF(XA_2
3、1,XA_20),XA_21);XA_23:=CONST(XA_22);STICKLINE(OPENCLOSE,CLOSE,OPEN,3,1),COLOR00CC00;XA_24:=BARSLAST(LOW=LLV(LOW,180);XA_25:=REF(LOW,XA_24);XA_26:=BARSLAST(HIGH=HHV(HIGH,XA_24);XA_27:=REF(HIGH,XA_26);XA_28:=BARSLAST(LOW=LLV(LOW,XA_26);XA_29:=REF(LOW,XA_28);XA_30:=INTPART(XA_26+1)/2);XA_31:=REFDATE(XA
4、_27,DATE);XA_32:=REFDATE(CLOSE,DATE);XA_33:=REFDATE(XA_29,DATE);C线:DRAWLINE(CURRBARSCOUNT=CONST(XA_26+1),XA_33,CURRBARSCOUNT=CONST(XA_30),XA_32,0),COLORBLACK;D线:DRAWLINE(CURRBARSCOUNT=CONST(XA_30),XA_32,CURRBARSCOUNT=CONST(1),XA_33,0),COLORBLACK;FFG1:DRAWBAND(C线,RGB(255,0,0),XA_33,RGB(255,0,0);FFG2:
5、DRAWBAND(D线,RGB(50,205,50),XA_33,RGB(50,205,50);DRAWKLINE(HIGH,OPEN,LOW,CLOSE);STICKLINE(OPENCLOSE,CLOSE,OPEN,3,1),COLOR00CC00;XA_34:=CONST(XA_28+XA_28);XA_35:=CONST(CLOSE+0.01);XA_36:=REFDATE(XA_35,DATE);XA_37:=REF(XA_22,XA_20+1);XA_38:=CONST(XA_37);XA_39:=REF(HIGH,XA_4)=HHV(HIGH,2*XA_4+1);XA_40:=C
6、ONST(XA_31+XA_33)/2);XA_41:=CONST(XA_31+XA_40)/2);XA_42:=CONST(XA_40+XA_33)/2);NOTEXTC区界限:IF(CURRBARSCOUNTA,DRAWNULL),DRAWNULL),COLORGREEN;XA_46:=BACKSET(XA_39,XA_4+1);XA_47:=FILTER(XA_46,XA_4)ANDHIGH=HHV(HIGH,XA_4+1);XA_48:=BARSLAST(XA_47);XA_49:=IF(XA_47,XA_5,0);XA_50:=IF(XA_48,REF(HIGH,XA_48),HIG
7、H);XA_51:=IF(XA_48,REF(XA_49,XA_48),XA_49);XA_52:=REF(XA_50,XA_48+1);XA_53:=CONST(XA_51);XA_54:=REF(XA_51,XA_48+1);XA_55:=CONST(XA_54);XA_56:=REF(LOW,XA_4)=LLV(LOW,2*XA_4+1);XA_57:=BACKSET(XA_56,XA_4+1);XA_58:=FILTER(XA_57,XA_4)ANDLOW=LLV(LOW,XA_4+1);XA_59:=BARSLAST(XA_58);XA_60:=CONST(XA_41);XA_61:
8、=CONST(XA_40);XA_62:=CONST(XA_42);XA_63:=IF(CLOSE=XA_60,AMOUNT,DRAWNULL);XA_64:=IF(CLOSE=XA_60,VOL,DRAWNULL);XA_65:=0.01*SUM(XA_63,XA_26)/SUM(XA_64,XA_26);XA_66:=REFDATE(XA_65,DATE);NOTEXTD区成本:IF(CURRBARSCOUNT=XA_61,AMOUNT,DRAWNULL);XA_68:=IF(CLOSE=XA_61,VOL,DRAWNULL);XA_69:=0.01*SUM(XA_67,XA_26)/SU
9、M(XA_68,XA_26);XA_70:=REFDATE(XA_69,DATE);NOTEXTC区成本:IF(CURRBARSCOUNT=XA_62,AMOUNT,DRAWNULL);XA_72:=IF(CLOSE=XA_62,VOL,DRAWNULL);XA_73:=0.01*SUM(XA_71,XA_26)/SUM(XA_72,XA_26);XA_74:=REFDATE(XA_73,DATE);NOTEXTB区成本:IF(CURRBARSCOUNT本:IF(CURRBARSCOUNT=XA_36,AMOUNT,DRAWNULL);XA_80:=IF(CLOSE=XA_36,VOL,DRA
10、WNULL);XA_81:=0.01*SUM(XA_79,XA_26)/SUM(XA_80,XA_26);XA_82:=REFDATE(XA_81,DATE);XA_83:=IF(XA_58,XA_5,0);XA_84:=IF(XA_59,REF(XA_83,XA_59),XA_83);XA_85:=CONST(XA_84);XA_86:=REF(XA_84,XA_59+1);XA_87:=CONST(XA_86);XA_88:=REF(HIGH,XA_3)=HHV(HIGH,2*XA_3+1);XA_89:=BACKSET(XA_88,XA_3+1);XA_90:=FILTER(XA_89,
11、XA_3)ANDHIGH=HHV(HIGH,XA_3+1);XA_91:=BARSLAST(XA_90);NOTEXT上区成本:IF(CURRBARSCOUNT=XA_60,XA_96,DRAWNULL);XA_98:=CONST(INTPART(SUM(XA_97,XA_26);VB143:DRAWTEXT(CURRBARSCOUNT=CONST(13),XA_66,1),COLORLIGRAY;VB144:DRAWNUMBER(CURRBARSCOUNT=CONST(6),XA_66*1.007,XA_98),COLORYELLOW;XA_99:=IF(CLOSE=XA_61,XA_96,
12、DRAWNULL);XA_100:=CONST(INTPART(SUM(XA_99,XA_26);VB148:DRAWTEXT(CURRBARSCOUNT=CONST(13),XA_70,2),COLORRED;VB149:DRAWNUMBER(CURRBARSCOUNT=CONST(6),XA_70*1.007,XA_100),COLORYELLOW;XA_101:=IF(CLOSE=XA_62,XA_96,DRAWNULL);XA_102:=CONST(INTPART(SUM(XA_101,XA_26);VB153:DRAWTEXT(CURRBARSCOUNT=CONST(13),XA_7
13、4,3),COLORMAGENTA;XA_103:=IF(XA_90,XA_5,0);XA_104:=IF(XA_91,REF(HIGH,XA_91),HIGH);XA_105:=IF(XA_91,REF(XA_103,XA_91),XA_103);XA_106:=REF(XA_104,XA_91+1);XA_107:=CONST(XA_105);XA_108:=REF(XA_105,XA_91+1);XA_109:=CONST(XA_108);XA_110:=REF(XA_106,XA_91+1);VB154:DRAWNUMBER(CURRBARSCOUNT=CONST(6),XA_74*1.007,XA_102),COLORYELLOW;XA_111:=IF(CLOSE=XA_36,XA_96,DRAWNULL);XA_114:=CONST(INTPART(SUM(XA_113,XA_26);VB163:DRAWTEXT(CURRBARSCOUNT=CONST(XA_26),XA_82,5),COLORYELLOW;VB164:DRAWNUMBER(CURRBARSCOUNT=CONST(XA_26-7),XA_82*1.007,XA_114),COLORYELLOW;XA_115:=IF(CLOSE
限制150内