-
Notifications
You must be signed in to change notification settings - Fork 69
/
ChanlunX.txt
55 lines (43 loc) · 2.79 KB
/
ChanlunX.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
{参数: 包含 线段 笔中枢 段中枢}
包含:=0;
线段:=1;
笔中枢:=0;
段中枢:=0;
DIRECTION:=TDXDLL1(1,0,H,L);{1表示方向向上,-1表示方向向下}
INCLUDE:=TDXDLL1(2,0,H,L);{1表示和前面K线发生了包含关系,0表示和前面K线没有发生包含关系}
OUTH:=TDXDLL1(3,0,H,L);{包含处理后的K线高}
OUTL:=TDXDLL1(4,0,H,L);{包含处理后的K线低}
INC:=TDXDLL1(5,0,0,INCLUDE);{处理一下包含信号方便画图}
FRAC:=TDXDLL1(6,0,H,L);{计算分型顶底}
DUAN:=TDXDLL1(7,FRAC,H,L);{计算段的端点}
BISE:=TDXDLL1(10,FRAC,H,L);{输出笔中枢开始和结束}
BIZG:=TDXDLL1(8,FRAC,H,L);{输出笔中枢高}
BIZD:=TDXDLL1(9,FRAC,H,L);{输出笔中枢低}
DUANSE:=TDXDLL1(10,DUAN,H,L);{输出段中枢开始和结束}
DUANZG:=TDXDLL1(8,DUAN,H,L);{输出段中枢高}
DUANZD:=TDXDLL1(9,DUAN,H,L);{输出段中枢低}
NOTEXT画包含高1:DRAWLINE(包含=1 AND INC=1 AND REF(INC,1)!=1,OUTH,包含=1 AND INC=1 AND REFX(INC,1)!=1,OUTH,0),COLORLIMAGENTA;
NOTEXT画包含低1:DRAWLINE(包含=1 AND INC=1 AND REF(INC,1)!=1,OUTL,包含=1 AND INC=1 AND REFX(INC,1)!=1,OUTL,0),COLORLIMAGENTA;
NOTEXT画包含高2:IF(包含=1 AND INC=2,OUTH,DRAWNULL),COLORLIMAGENTA;
NOTEXT画包含低2:IF(包含=1 AND INC=2,OUTL,DRAWNULL),COLORLIMAGENTA;
NOTEXT画包含竖1:STICKLINE(包含=1 AND INCLUDE=0 AND REFX(INCLUDE,1)=1,OUTH,OUTL,0,0),COLORLIMAGENTA;
NOTEXT画包含竖2:STICKLINE(包含=1 AND INCLUDE=1 AND REFX(INCLUDE,1)=0,OUTH,OUTL,0,0),COLORLIMAGENTA;
NOTEXT画包含竖3:STICKLINE(包含=1 AND INCLUDE=1 AND ISLASTBAR,OUTH,OUTL,0,0),COLORLIMAGENTA;
NOTEXT画上升笔:DRAWLINE(FRAC=-1,L,FRAC=+1,H,0), DOTLINE, COLORYELLOW;
NOTEXT画下降笔:DRAWLINE(FRAC=+1,H,FRAC=-1,L,0), DOTLINE, COLORYELLOW;
NOTEXT画上升段:DRAWLINE(线段 AND DUAN=-1,L,DUAN=+1,H,0), COLORFF8000;
NOTEXT画下降段:DRAWLINE(线段 AND DUAN=+1,H,DUAN=-1,L,0), COLORFF8000;
NOTEXT_DBIZG:IF(笔中枢 AND BIZG,BIZG,DRAWNULL), COLORYELLOW;{画笔中枢高}
NOTEXT_DBIZD:IF(笔中枢 AND BIZD,BIZD,DRAWNULL), COLORYELLOW;{画笔中枢低}
NOTEXT_DBISE:STICKLINE(笔中枢 AND BISE,BIZD,BIZG,0,0), COLORYELLOW;{画笔中枢起始结束};
NOTEXT_DDUANZG:IF(段中枢 AND DUANZG,DUANZG,DRAWNULL),COLORFF8000;{画段中枢高}
NOTEXT_DDUANZD:IF(段中枢 AND DUANZD,DUANZD,DRAWNULL),COLORFF8000;{画段中枢低}
NOTEXT_DDUANSE:STICKLINE(段中枢 AND DUANSE,DUANZD,DUANZG,0,0),COLORFF8000;{画段中枢起始结束};
VAR1:=BARSLAST(FRAC=-1);
VAR3:=BARSLAST(FRAC=1);
涨速:=CONST((REF(H,VAR3)-REF(L,VAR1))/REF(L,VAR1)/(VAR1-VAR3+1)),NODRAW;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.98,1,1,STRCAT('涨速:',VAR2STR(涨速,4)));
T1:=DATE>REF(DATE,1);
T2:=BARSLAST(T1)+1;
分时均价:IF(PERIOD=0 OR PERIOD=1,(SUM(AMO,T2)/SUM(VOL,T2))/100,DRAWNULL),COLORLIMAGENTA,DOTLINE;
MA60:MA(C,60), COLORRED;