通达信指标公式源码日线级别地量,大盘个股K线同框主图指标
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
通达信指标公式源码⽇线级别地量,⼤盘个股K线同框主图指标
{妞妞地量⽇线看盘主图}
N:=350;
Y1:=C>O OR (C=O AND C>=REF(C,1)); Y2:=C
L1:=IF(Y1,VOL,0);
L2:=IF(Y2,VOL,9999999999);
T1:=CONST(FINDHIGHBARS(L1,0,N,1)); T2:=CONST(FINDHIGHBARS(L1,0,N,2)); T3:=CONST(FINDHIGHBARS(L1,0,N,3)); T4:=CONST(FINDHIGHBARS(L1,0,N,4)); T5:=CONST(FINDHIGHBARS(L1,0,N,5)); T6:=CONST(FINDHIGHBARS(L1,0,N,6)); T7:=CONST(FINDHIGHBARS(L1,0,N,7)); T8:=CONST(FINDHIGHBARS(L1,0,N,8)); T9:=CONST(FINDHIGHBARS(L1,0,N,9)); T10:=CONST(FINDHIGHBARS(L1,0,N,10)); D1:=CONST(FINDLOWBARS(L2,0,N,1));
D2:=CONST(FINDLOWBARS(L2,0,N,2));
D3:=CONST(FINDLOWBARS(L2,0,N,3));
D4:=CONST(FINDLOWBARS(L2,0,N,4));
D5:=CONST(FINDLOWBARS(L2,0,N,5));
D6:=CONST(FINDLOWBARS(L2,0,N,6));
D7:=CONST(FINDLOWBARS(L2,0,N,7));
D8:=CONST(FINDLOWBARS(L2,0,N,8));
D9:=CONST(FINDLOWBARS(L2,0,N,9));
D10:=CONST(FINDLOWBARS(L2,0,N,10));
DRAWLINE(CURRBARSCOUNT=T1+1,C,ISLASTBAR,REF(C,T1),0),COLORMAG ENTA;
DRAWLINE(CURRBARSCOUNT=T2+1,C,ISLASTBAR,REF(C,T2),0),COLORMAG ENTA;
DRAWLINE(CURRBARSCOUNT=T3+1,C,ISLASTBAR,REF(C,T3),0),COLORMAG ENTA;
DRAWLINE(CURRBARSCOUNT=T4+1 ,C,ISLASTBAR,REF(C,T4),0),COLORMAG ENTA;
DRAWLINE(CURRBARSCOUNT=T5+1 ,C,ISLASTBAR,REF(C,T5),0),COLORMAG ENTA;
DRAWLINE(CURRBARSCOUNT=T6+1 ,C,ISLASTBAR,REF(C,T6),0),COLORMAG ENTA;
DRAWLINE(CURRBARSCOUNT=T7+1 ,C,ISLASTBAR,REF(C,T7),0),COLORMAG ENTA;
DRAWLINE(CURRBARSCOUNT=T8+1 ,C,ISLASTBAR,REF(C,T8),0),COLORMAG ENTA;
DRAWLINE(CURRBARSCOUNT=T9+1 ,C,ISLASTBAR,REF(C,T9),0),COLORMAG ENTA;
DRAWLINE(CURRBARSCOUNT=T10+1 ,C,ISLASTBAR,REF(C,T10),0),COLORM AGENTA;
E:DRAWLINE(CURRBARSCOUNT=D1+1 ,C,ISLASTBAR,REF(C,D1),0),COLORG REEN;
E1:DRAWLINE(CURRBARSCOUNT=D2+1,C,ISLASTBAR,REF(C,D2),0),COLORG REEN;
E2:DRAWLINE(CURRBARSCOUNT=D3+1,C,ISLASTBAR,REF(C,D3),0),COLORG REEN;
E3:DRAWLINE(CURRBARSCOUNT=D4+1 ,C,ISLASTBAR,REF(C,D4),0),COLOR GREEN;
E4:DRAWLINE(CURRBARSCOUNT=D5+1,C,ISLASTBAR,REF(C,D5),0),COLORG REEN;
E5:DRAWLINE(CURRBARSCOUNT=D6+1 ,C,ISLASTBAR,REF(C,D6),0),COLOR GREEN;
E6:DRAWLINE(CURRBARSCOUNT=D7+1,C,ISLASTBAR,REF(C,D7),0),COLORG REEN;
E7:DRAWLINE(CURRBARSCOUNT=D8+1,C,ISLASTBAR,REF(C,D8),0),COLORG REEN;
E8:DRAWLINE(CURRBARSCOUNT=D9+1 ,C,ISLASTBAR,REF(C,D9),0),COLOR GREEN;
E9:DRAWLINE(CURRBARSCOUNT=D10+1 ,C,ISLASTBAR,REF(C,D10),0),COLO RGREEN;
HH:=MAX(MAX(MAX(MAX(MAX(MAX(MAX(MAX(MAX(E,E1),E2),E3),E4),E5),E6 ),E7),E8),E9);
T:=BARSLAST(C=CONST(HH));
DRAWLINE(CURRBARSCOUNT=CONST(T)+1,C,ISLASTBAR,REF(C,T),0),COLO RYELLOW,LINETHICK2;
将⼤盘和个股的K线⾛势变通后,放在同⼀个主图⾥,当K线出现重合⼀般会有变盘时间窗⼝。
使⽤后请仔细观察。
当出现黄⾊K线时如果在底部请注意向上变盘。
如果在⾼位注意参考向下变盘!指标只是给你参考,不可能100%准确!!{⼤盘和个股同框主图}
n:=70;
CY:=INBLOCK('创业板');
ZXB:=INBLOCK('中⼩企业');
SZ:=INBLOCK('上证A股');
H2:=IF(ZXB=1,"399005$H",IF(CY=1,"399006$H",IF(SZ=1,"999999$H","3990 01$H")));
O2:=IF(ZXB=1,"399005$O",IF(CY=1,"399006$O",IF(SZ=1,"999999$O","3990 01$O")));
L2:=IF(ZXB=1,"399005$L",IF(CY=1,"399006$L",IF(SZ=1,"999999$L","39900 1$L")));
C2:=IF(ZXB=1,"399005$C",IF(CY=1,"399006$C",IF(SZ=1,"999999$C","39900 1$C")));
DL:=CONST(LLV(L2,N));
DH:=CONST(HHV(H2,N));
DC:=DH-DL;
GL:=CONST(LLV(L,N));
GH:=CONST(HHV(H,N));
GC:=GH-GL;
B:=GC/DC;
CC:=GL+(C2-DL)*B;
OO:=GL+(O2-DL)*B;
LL:=GL+(L2-DL)*B;
HH:=GL+(H2-DL)*B;
TJ0:=BETWEEN(MIN(CC,OO),MIN(C,O),MAX(C,O)) OR BETWEEN(MAX(CC,OO),MIN(C,O),MAX(C,O));
TJ1:=BETWEEN(MIN(C,O),MIN(CC,OO),MAX(CC,OO)) OR BETWEEN(MAX(C,O),MIN(CC,OO),MAX(CC,OO));
TJ:=TJ0 OR TJ1;
T:=BARSLAST(TJ);
GG:=MAX(MAX(MAX(C,O),CC),OO);
DD:=MIN(MIN(MIN(C,O),CC),OO);
DRAWKLINE(H,O,L,C);
STICKLINE(C2>O2,CC,HH,0,0),COLORMAGENTA; STICKLINE(C2>O2,CC,OO,2,1),COLORMAGENTA; STICKLINE(C2>O2,LL,OO,0,0),COLORMAGENTA; STICKLINE(C2
STICKLINE(C2。