通达信长、短周期都可以进行半对数自动预测的主图指标 源码 附图
天数:=80;
顶底开关:=1;
DRAWTEXT_FIX(1,0.50,0.01,1,'说明: 本指标以设置天数范围作为自动选择高、低点进行两点半对数预测,可按ALT+T键弹出参数调整窗,进行天数调整,缺省为80天。'),COLORYELLOW;
DRAWTEXT_FIX(1,0.30,0.04,1,'标题栏上的买(卖)P4、买(卖)P5是费氏数列1.236、1.618的预测股价'),COLORMAGENTA;
AR1:=BARSCOUNT(C);
AR2:=CONST(AR1);
AR3:=AR2-AR1;
K线根数:AR3+1,NODRAW,COLORYELLOW;
STICKLINE(C>=O,C,O,3,0),COLOR000045;
STICKLINE(C>=O,C,O,2.5,0),COLOR000065;
STICKLINE(C>=O,C,O,2,0),COLOR000085;
STICKLINE(C>=O,C,O,1.5,0),COLOR0000A5;
STICKLINE(C>=O,C,O,1,0),COLOR0000C5;
STICKLINE(C>=O,C,O,0.5,0),COLOR0000E5;
STICKLINE(C>=O,H,L,0,0),COLOR0000F5;
STICKLINE(C<O,C,O,3,0),COLORFF9900;
STICKLINE(C<O,C,O,2.5,0),COLORFF9900;
STICKLINE(C<O,C,O,2,0),COLORFFCC00;
STICKLINE(C<O,C,O,1.5,0),COLORFFCC00;
STICKLINE(C<O,C,O,1,0),COLORCYAN;
STICKLINE(C<O,C,O,0.5,0),COLORCYAN;
JA :=3*SMA((CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100,3,1)-2*SMA(SMA((CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100,3,1),3,1),NODRAW;
STICKLINE(顶底开关>0 AND (JA >=90),CLOSE,OPEN,3,0),COLOR009CFF;
STICKLINE(顶底开关>0 AND (JA >=90),CLOSE,OPEN,2.8,0),COLOR009CFF;
STICKLINE(顶底开关>0 AND (JA >=90),CLOSE,OPEN,2.5,0),COLOR00C0FF;
STICKLINE(顶底开关>0 AND (JA >=90),CLOSE,OPEN,1.5,0),COLOR00D1FF;
STICKLINE(顶底开关>0 AND (JA >=90),CLOSE,OPEN,1,0),COLOR00EAFF;
STICKLINE(顶底开关>0 AND (JA >=90),CLOSE,OPEN,0.7,0),COLORYELLOW;
STICKLINE(顶底开关>0 AND (JA <=10),OPEN,CLOSE,3,0),COLORFF0000;
STICKLINE(顶底开关>0 AND (JA <=10),OPEN,CLOSE,2.5,0),COLORFF1100;
STICKLINE(顶底开关>0 AND (JA <=10),OPEN,CLOSE,2,0),COLORFF2200;
STICKLINE(顶底开关>0 AND (JA <=10),OPEN,CLOSE,1.5,0),COLORFF3300;
STICKLINE(顶底开关>0 AND (JA <=10),OPEN,CLOSE,1,0),COLORFF4400;
STICKLINE(顶底开关>0 AND (JA <=10),OPEN,CLOSE,0.5,0),COLORFF5500;
STICKLINE(顶底开关>0 AND (JA <=10),H,L,0,0),COLORFF6600;
GGA:=REF(HHV(H,天数),0);
LLA:=REF(LLV(L,天数),0);
A1:=H=CONST(HHV(H,天数)),NODRAW;
B1:=L=CONST(LLV(L,天数)),NODRAW;
GGB:=BARSLAST(A1)+1,NODRAW;
LLB:=BARSLAST(B1)+1,NODRAW;
H1:=IF(GGB<LLB,POW(LLA,0.125)*POW(GGA,0.875),DRAWNULL);
H2:=IF(GGB<LLB,POW(LLA,0.382)*POW(GGA,0.618),DRAWNULL);
H3:=IF(GGB<LLB,SQRT(LLA*GGA),DRAWNULL);
H4:=IF(GGB<LLB,POW(LLA,0.618)*POW(GGA,0.382),DRAWNULL);
H5:=IF(GGB<LLB,POW(LLA,0.875)*POW(GGA,0.125),DRAWNULL);
H6:=IF(GGB<LLB,GGA-(GGA-LLA)*1.236,DRAWNULL)NODRAW;
H7:=IF(GGB<LLB,GGA-(GGA-LLA)*1.618,DRAWNULL)NODRAW;
高点:REFDATE(GGA,DATE),COLORRED,LINETHICK1;
低点:REFDATE(LLA,DATE),COLORGREEN,LINETHICK1;
买甘氏角A:REFDATE(H1,DATE),COLORMAGENTA,CIRCLEDOT,LINETHICK1;
买P1:REFDATE(H2,DATE),COLORRED,DOTLINE,LINETHICK1;
买P2:REFDATE(H3,DATE),COLORGREEN,DOTLINE,LINETHICK1;
买P3:REFDATE(H4,DATE),COLORWHITE,DOTLINE,LINETHICK1;
买甘氏角B:REFDATE(H5,DATE),COLORLIRED,CIRCLEDOT,LINETHICK1;
买P4:CONST(H6),NODRAW,COLORYELLOW;
买P5:CONST(H7),NODRAW,COLORRED;
DRAWTEXT(CURRBARSCOUNT=6,CONST(GGA),VARCAT('高点=',VAR2STR(CONST(GGA),2))),COLORGREEN;
DRAWTEXT(CURRBARSCOUNT=9,买甘氏角A,VARCAT('买甘氏价A=',VAR2STR(CONST(H1),2))),DRAWABOVE,COLORLIRED;
DRAWTEXT(CURRBARSCOUNT=6,买P1,VARCAT('买P1=',VAR2STR(CONST(H2),2))),DRAWABOVE,COLORYELLOW;
DRAWTEXT(CURRBARSCOUNT=6,买P2,VARCAT('买P2=',VAR2STR(CONST(H3),2))),DRAWABOVE,COLORYELLOW;
DRAWTEXT(CURRBARSCOUNT=6,买P3,VARCAT('买P3=',VAR2STR(CONST(H4),2))),DRAWABOVE,COLORYELLOW;
DRAWTEXT(CURRBARSCOUNT=9,买甘氏角B,VARCAT('买甘氏角B=',VAR2STR(CONST(H5),2))),DRAWABOVE,COLORGREEN;
DRAWTEXT(CURRBARSCOUNT=6,CONST(LLA),VARCAT('低点=',VAR2STR(CONST(LLA),2))),COLORRED;
STICKLINE(CURRBARSCOUNT=天数,CONST(LLA),CONST(GGA),0.5,1),COLORFF8800;
STICKLINE(CURRBARSCOUNT=1,CONST(LLA),CONST(GGA),0,1),COLORFF8800;
DRAWTEXT(CURRBARSCOUNT=天数,CONST(LLA),VARCAT('天数 ',VAR2STR(CONST(天数),0))),COLORYELLOW;
L1:=IF(GGB>LLB,POW(LLA,0.875)*POW(GGA,0.125),DRAWNULL);
L2:=IF(GGB>LLB,POW(LLA,0.618)*POW(GGA,0.382),DRAWNULL);
L3:=IF(GGB>LLB,SQRT(LLA*GGA),DRAWNULL);
L4:=IF(GGB>LLB,POW(LLA,0.382)*POW(GGA,0.618),DRAWNULL);
L5:=IF(GGB>LLB,POW(LLA,0.125)*POW(GGA,0.875),DRAWNULL);
L6:=IF(GGB>LLB,LLA+(GGA-LLA)*1.236,DRAWNULL)NODRAW;
L7:=IF(GGB>LLB,LLA+(GGA-LLA)*1.618,DRAWNULL)NODRAW;
卖甘氏角A:REFDATE(L1,DATE),COLORMAGENTA,CIRCLEDOT,LINETHICK1;
卖P1:REFDATE(L2,DATE),COLORRED,DOTLINE,LINETHICK1;
卖P2:REFDATE(L3,DATE),COLORGREEN,DOTLINE,LINETHICK1;
卖P3:REFDATE(L4,DATE),COLORWHITE,DOTLINE,LINETHICK1;
卖甘氏角B:REFDATE(L5,DATE),COLORLIRED,CIRCLEDOT,LINETHICK1;
卖P4:CONST(L6),NODRAW,COLORYELLOW;
卖P5:CONST(L7),NODRAW,COLORRED;
DRAWTEXT(CURRBARSCOUNT=9,卖甘氏角A,VARCAT('卖甘氏角A=',VAR2STR(CONST(L1),2))),DRAWABOVE,COLORLIRED;
DRAWTEXT(CURRBARSCOUNT=6,卖P1,VARCAT('卖P1=',VAR2STR(CONST(L2),2))),DRAWABOVE,COLORWHITE;
DRAWTEXT(CURRBARSCOUNT=6,卖P2,VARCAT('卖P2=',VAR2STR(CONST(L3),2))),DRAWABOVE,COLORWHITE;
DRAWTEXT(CURRBARSCOUNT=6,卖P3,VARCAT('卖P3=',VAR2STR(CONST(L4),2))),DRAWABOVE,COLORWHITE;
DRAWTEXT(CURRBARSCOUNT=9,卖甘氏角B,VARCAT('卖甘氏角B=',VAR2STR(CONST(L5),2))),DRAWABOVE,COLORGREEN;
顶价:=REF(H,BARSLAST(H>REF(H,1)));
底价:=REF(L,BARSLAST(L<REF(L,1)));
分型顶0:=H>REF(顶价,1) AND L>REF(底价,1);
分型底0:=L<REF(底价,1) AND H<REF(顶价,1);
分型顶1:=分型顶0 AND H=HHV(H,BARSLAST(分型底0));
分型底1:=分型底0 AND L=LLV(L,BARSLAST(分型顶0));
分型顶:=FILTERX(分型顶1,BARSLAST(分型底1));
分型底:=FILTERX(分型底1,BARSLAST(分型顶1));
UP1:=BARSLAST(分型底);
顶力度1:=HHV(L,UP1+1)>LLV(H,UP1+1);
顶包含1:=COUNT(L>REF(L,1),UP1)>2 AND COUNT(H>REF(H,1),UP1)>2;
DN1:=BARSLAST(分型顶);
底力度1:=HHV(L,DN1+1)>LLV(H,DN1+1);
底包含1:=COUNT(H<REF(H,1),DN1)>2 AND COUNT(L<REF(L,1),DN1)>2;
笔顶10:=分型顶 AND UP1>3 AND 顶力度1 AND 顶包含1;
笔底10:=分型底 AND DN1>3 AND 底力度1 AND 底包含1;
笔顶11:=笔顶10 AND H=HHV(H,BARSLAST(笔底10));
笔底11:=笔底10 AND L=LLV(L,BARSLAST(笔顶10));
笔顶12:=笔顶11 AND H=HHV(H,BARSLAST(笔底11));
笔底12:=笔底11 AND L=LLV(L,BARSLAST(笔顶11));
笔顶1:=FILTERX(笔顶12,BARSLAST(笔底12));
笔底1:=FILTERX(笔底12,BARSLAST(笔顶12));
UP2:=BARSLAST(笔底1);
顶力度2:=HHV(L,UP2+1)>LLV(H,UP2+1);
顶包含2:=COUNT(L>REF(L,1),UP2)>2 AND COUNT(H>REF(H,1),UP2)>2;
DN2:=BARSLAST(笔顶1);
底力度2:=HHV(L,DN2+1)>LLV(H,DN2+1);
底包含2:=COUNT(H<REF(H,1),DN2)>2 AND COUNT(L<REF(L,1),DN2)>2;
笔顶20:=分型顶 AND UP2>3 AND 顶力度2 AND 顶包含2;
笔底20:=分型底 AND DN2>3 AND 底力度2 AND 底包含2;
笔顶21:=笔顶20 AND H=HHV(H,BARSLAST(笔底20));
笔底21:=笔底20 AND L=LLV(L,BARSLAST(笔顶20));
笔顶2:=FILTERX(笔顶21,BARSLAST(笔底21));
笔底2:=FILTERX(笔底21,BARSLAST(笔顶21));
笔顶3:=笔顶1 OR 笔顶2;
笔底3:=笔底1 OR 笔底2;
笔顶41:=FILTERX(笔顶3 AND H=HHV(H,BARSLAST(笔底3)),BARSLAST(笔底3));
笔底41:=FILTERX(笔底3 AND L=LLV(L,BARSLAST(笔顶3)),BARSLAST(笔顶3));
笔顶42:=FILTERX(笔顶41 AND H=HHV(H,BARSLAST(笔底41)),BARSLAST(笔底41));
笔底42:=FILTERX(笔底41 AND L=LLV(L,BARSLAST(笔顶41)),BARSLAST(笔顶41));
笔顶431:=笔顶42 AND (BARSLAST(笔底42)>1 OR BARSLAST(笔底42)=DRAWNULL);
笔底431:=笔底42 AND (BARSLAST(笔顶42)>1 OR BARSLAST(笔顶42)=DRAWNULL);
笔顶432:=笔顶431 AND (H=HHV(H,BARSLAST(笔底431)) OR BARSLAST(笔底431)=DRAWNULL);
笔底432:=笔底431 AND (L=LLV(L,BARSLAST(笔顶431)) OR BARSLAST(笔顶431)=DRAWNULL);
笔顶43:=FILTERX(笔顶432,BARSLAST(笔底431));
笔底43:=FILTERX(笔底432,BARSLAST(笔顶431));
笔顶441:=笔顶43 AND (BARSLAST(笔底43)>2 OR BARSLAST(笔底43)=DRAWNULL);
笔底441:=笔底43 AND (BARSLAST(笔顶43)>2 OR BARSLAST(笔顶43)=DRAWNULL);
笔顶442:=笔顶441 AND (H=HHV(H,BARSLAST(笔底441)) OR BARSLAST(笔底441)=DRAWNULL);
笔底442:=笔底441 AND (L=LLV(L,BARSLAST(笔顶441)) OR BARSLAST(笔顶441)=DRAWNULL);
笔顶44:=FILTERX(笔顶442,BARSLAST(笔底441));
笔底44:=FILTERX(笔底442,BARSLAST(笔顶441));
笔顶451:=笔顶44 AND (BARSLAST(笔底44)>3 OR BARSLAST(笔底44)=DRAWNULL);
笔底451:=笔底44 AND (BARSLAST(笔顶44)>3 OR BARSLAST(笔顶44)=DRAWNULL);
笔顶452:=笔顶451 AND (H=HHV(H,BARSLAST(笔底451)) OR BARSLAST(笔底451)=DRAWNULL);
笔底452:=笔底451 AND (L=LLV(L,BARSLAST(笔顶451)) OR BARSLAST(笔顶451)=DRAWNULL);
笔顶45:=FILTERX(笔顶452,BARSLAST(笔底452));
笔底45:=FILTERX(笔底452,BARSLAST(笔顶452));
DN511:=BARSLAST(笔顶45);
底力度511:=HHV(L,DN511+1)>LLV(H,DN511+1);
底包含511:=COUNT(H<REF(H,1),DN511)>2 AND COUNT(L<REF(L,1),DN511)>2;
笔底511:=笔底43 AND (笔底45<>1) AND DN511>3 AND 底力度511 AND 底包含511 AND (L=LLV(L,BARSLAST(笔顶45)));
笔底51:=FILTERX(笔底511,BARSLAST(笔顶45));
UP512:=BARSLAST(笔底45);
顶力度512:=HHV(L,UP512+1)>LLV(H,UP512+1);
顶包含512:=COUNT(L>REF(L,1),UP512)>2 AND COUNT(H>REF(H,1),UP512)>2;
笔顶512:=笔顶43 AND (笔顶45<>1) AND UP512>3 AND 顶力度512 AND 顶包含512 AND (H=HHV(H,BARSLAST(笔底45)));
笔顶51:=FILTERX(笔顶512,BARSLAST(笔底45));
笔顶521:=笔顶45 OR 笔顶51;
笔底521:=笔底45 OR 笔底51;
笔顶52:=FILTERX(笔顶521 AND H=HHV(H,BARSLAST(笔底521)),BARSLAST(笔底521));
笔底52:=FILTERX(笔底521 AND L=LLV(L,BARSLAST(笔顶521)),BARSLAST(笔顶521));
UP53:=BARSLAST(笔底52);
顶力度53:=HHV(L,UP53+1)>LLV(H,UP53+1);
顶包含53:=COUNT(L>REF(L,1),UP53)>2 AND COUNT(H>REF(H,1),UP53)>2;
DN53:=BARSLAST(笔顶52);
底力度53:=HHV(L,DN53+1)>LLV(H,DN53+1);
底包含53:=COUNT(H<REF(H,1),DN53)>2 AND COUNT(L<REF(L,1),DN53)>2;
笔顶53:=笔顶52 AND UP53>3 AND 顶力度53 AND 顶包含53 AND (H=HHV(H,BARSLAST(笔底52)));
笔底53:=笔底52 AND DN53>3 AND 底力度53 AND 底包含53 AND (L=LLV(L,BARSLAST(笔顶52)));
笔顶54:=FILTERX(笔顶53 AND H=HHV(H,BARSLAST(笔底53)),BARSLAST(笔底53));
笔底54:=FILTERX(笔底53 AND L=LLV(L,BARSLAST(笔顶53)),BARSLAST(笔顶53));
笔顶55:=H=HHV(H,BARSLAST(笔底54)) AND L>LLV(L,BARSLAST(笔底54)) AND BARSLAST(笔顶54)<BARSLAST(笔底54) AND (BARSNEXT(笔底54)<BARSNEXT(笔顶54) OR BARSNEXT(笔顶54)=DRAWNULL);
笔底55:=L=LLV(L,BARSLAST(笔顶54)) AND H<HHV(H,BARSLAST(笔顶54)) AND BARSLAST(笔底54)<BARSLAST(笔顶54) AND (BARSNEXT(笔顶54)<BARSNEXT(笔底54) OR BARSNEXT(笔底54)=DRAWNULL);
笔顶56:=笔顶54 OR 笔顶55;
笔底56:=笔底54 OR 笔底55;
笔顶6:=FILTERX(笔顶56 AND H=HHV(H,BARSLAST(笔底56)),BARSLAST(笔底56));
笔底6:=FILTERX(笔底56 AND L=LLV(L,BARSLAST(笔顶56)),BARSLAST(笔顶56));
笔顶7:=笔顶6 AND BARSLAST(笔底6)>3;
笔底7:=笔底6 AND BARSLAST(笔顶6)>3;
笔顶:=BARSLAST(笔顶7),NODRAW;
笔底:=BARSLAST(笔底7),NODRAW;
NOTEXT_上笔:DRAWLINE(笔底=0,L,笔顶=0,H,0),COLOR0000FF,LINETHICK1;
NOTEXT_下笔:DRAWLINE(笔顶=0,H,笔底=0,L,0),COLOR238E23,LINETHICK1;
K:=CURRBARSCOUNT,NODRAW;
DRAWNUMBER(笔顶=0,H,K),COLORLIRED,DRAWABOVE;
DRAWNUMBER(笔底=0,L,K),COLORFFFF00;
未来函数检测结果如下:
该公式包含未来函数:BARSNEXT
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
天数赋值:80
顶底开关赋值:1
当满足条件1时,在横轴0.50纵轴0.01位置书写文字
DRAWTEXT_FIX(1,0.30,0.04,1,'标题栏上的买(卖)P4、买(卖)P5是费氏数列1.236、1.618的预测股价'),画洋红色
AR1赋值:C的有效数据周期数
AR2赋值:CONST(AR1)
AR3赋值:AR2-AR1
输出K线根数:AR3+1,NODRAW,画黄色
当满足条件C>=O时,在C和O之间画柱状线
当满足条件C>=O时,在C和O之间画柱状线
当满足条件C>=O时,在C和O之间画柱状线
当满足条件C>=O时,在C和O之间画柱状线
当满足条件C>=O时,在C和O之间画柱状线
当满足条件C>=O时,在C和O之间画柱状线
当满足条件C>=O时,在H和L之间画柱状线
当满足条件C当满足条件C当满足条件C当满足条件C当满足条件C当满足条件C
JA :=3*SMA((收盘价-9日内最低价最低值)/(9日内最高价最高值-9日内最低价最低值)*100,3,1)-2*SMA(SMA((收盘价-9日内最低价最低值)/(9日内最高价最高值-9日内最低价最低值)*100,3,1),3,1),NODRAW
STICKLINE(顶底开关>0 AND (JA >=90),收盘价,开盘价,3,0),COLOR009CFF
STICKLINE(顶底开关>0 AND (JA >=90),收盘价,开盘价,2.8,0),COLOR009CFF
STICKLINE(顶底开关>0 AND (JA >=90),收盘价,开盘价,2.5,0),COLOR00C0FF
STICKLINE(顶底开关>0 AND (JA >=90),收盘价,开盘价,1.5,0),COLOR00D1FF
STICKLINE(顶底开关>0 AND (JA >=90),收盘价,开盘价,1,0),COLOR00EAFF
STICKLINE(顶底开关>0 AND (JA >=90),收盘价,开盘价,0.7,0),画黄色
STICKLINE(顶底开关>0 AND (JA <=10),开盘价,收盘价,3,0),COLORFF0000
STICKLINE(顶底开关>0 AND (JA <=10),开盘价,收盘价,2.5,0),COLORFF1100
STICKLINE(顶底开关>0 AND (JA <=10),开盘价,收盘价,2,0),COLORFF2200
STICKLINE(顶底开关>0 AND (JA <=10),开盘价,收盘价,1.5,0),COLORFF3300
STICKLINE(顶底开关>0 AND (JA <=10),开盘价,收盘价,1,0),COLORFF4400
STICKLINE(顶底开关>0 AND (JA <=10),开盘价,收盘价,0.5,0),COLORFF5500
STICKLINE(顶底开关>0 AND (JA <=10),H,L,0,0),COLORFF6600
GGA赋值:REF(天数日内H最高值,0)
LLA赋值:REF(天数日内L最低值,0)
A1赋值:H=CONST(天数日内H最高值),NODRAW
B1赋值:L=CONST(天数日内L最低值),NODRAW
GGB赋值:上次A1距今天数+1,NODRAW
LLB赋值:上次B1距今天数+1,NODRAW
H1赋值:IF(GGB
H2赋值:IF(GGB
H3赋值:IF(GGB
H4赋值:IF(GGB
H5赋值:IF(GGB
H6赋值:IF(GGB
H7赋值:IF(GGB
输出高点:REFDATE(GGA,DATE),画红色,LINETHICK1
输出低点:REFDATE(LLA,DATE),画绿色,LINETHICK1
输出买甘氏角A:REFDATE(H1,DATE),画洋红色,CIRCLEDOT,LINETHICK1
输出买P1:REFDATE(H2,DATE),画红色,DOTLINE,LINETHICK1
输出买P2:REFDATE(H3,DATE),画绿色,DOTLINE,LINETHICK1
输出买P3:REFDATE(H4,DATE),画白色,DOTLINE,LINETHICK1
输出买甘氏角B:REFDATE(H5,DATE),COLORLIRED,CIRCLEDOT,LINETHICK1
输出买P4:CONST(H6),NODRAW,画黄色
输出买P5:CONST(H7),NODRAW,画红色
DRAWTEXT( 到最后交易的周期=6,CONST(GGA),VARCAT('高点=',VAR2STR(CONST(GGA),2))),画绿色
DRAWTEXT( 到最后交易的周期=9,买甘氏角A,VARCAT('买甘氏价A=',VAR2STR(CONST(H1),2))),DRAWABOVE,COLORLIRED
DRAWTEXT( 到最后交易的周期=6,买P1,VARCAT('买P1=',VAR2STR(CONST(H2),2))),DRAWABOVE,画黄色
DRAWTEXT( 到最后交易的周期=6,买P2,VARCAT('买P2=',VAR2STR(CONST(H3),2))),DRAWABOVE,画黄色
DRAWTEXT( 到最后交易的周期=6,买P3,VARCAT('买P3=',VAR2STR(CONST(H4),2))),DRAWABOVE,画黄色
DRAWTEXT( 到最后交易的周期=9,买甘氏角B,VARCAT('买甘氏角B=',VAR2STR(CONST(H5),2))),DRAWABOVE,画绿色
DRAWTEXT( 到最后交易的周期=6,CONST(LLA),VARCAT('低点=',VAR2STR(CONST(LLA),2))),画红色
STICKLINE( 到最后交易的周期=天数,CONST(LLA),CONST(GGA),0.5,1),COLORFF8800
STICKLINE( 到最后交易的周期=1,CONST(LLA),CONST(GGA),0,1),COLORFF8800
DRAWTEXT( 到最后交易的周期=天数,CONST(LLA),VARCAT('天数 ',VAR2STR(CONST(天数),0))),画黄色
L1赋值:IF(GGB>LLB,POW(LLA,0.875)*POW(GGA,0.125),DRAWNULL)
L2赋值:IF(GGB>LLB,POW(LLA,0.618)*POW(GGA,0.382),DRAWNULL)
L3赋值:IF(GGB>LLB,SQRT(LLA*GGA),DRAWNULL)
L4赋值:IF(GGB>LLB,POW(LLA,0.382)*POW(GGA,0.618),DRAWNULL)
L5赋值:IF(GGB>LLB,POW(LLA,0.125)*POW(GGA,0.875),DRAWNULL)
L6赋值:IF(GGB>LLB,LLA+(GGA-LLA)*1.236,DRAWNULL)NODRAW
L7赋值:IF(GGB>LLB,LLA+(GGA-LLA)*1.618,DRAWNULL)NODRAW
输出卖甘氏角A:REFDATE(L1,DATE),画洋红色,CIRCLEDOT,LINETHICK1
输出卖P1:REFDATE(L2,DATE),画红色,DOTLINE,LINETHICK1
输出卖P2:REFDATE(L3,DATE),画绿色,DOTLINE,LINETHICK1
输出卖P3:REFDATE(L4,DATE),画白色,DOTLINE,LINETHICK1
输出卖甘氏角B:REFDATE(L5,DATE),COLORLIRED,CIRCLEDOT,LINETHICK1
输出卖P4:CONST(L6),NODRAW,画黄色
输出卖P5:CONST(L7),NODRAW,画红色
DRAWTEXT( 到最后交易的周期=9,卖甘氏角A,VARCAT('卖甘氏角A=',VAR2STR(CONST(L1),2))),DRAWABOVE,COLORLIRED
DRAWTEXT( 到最后交易的周期=6,卖P1,VARCAT('卖P1=',VAR2STR(CONST(L2),2))),DRAWABOVE,画白色
DRAWTEXT( 到最后交易的周期=6,卖P2,VARCAT('卖P2=',VAR2STR(CONST(L3),2))),DRAWABOVE,画白色
DRAWTEXT( 到最后交易的周期=6,卖P3,VARCAT('卖P3=',VAR2STR(CONST(L4),2))),DRAWABOVE,画白色
DRAWTEXT( 到最后交易的周期=9,卖甘氏角B,VARCAT('卖甘氏角B=',VAR2STR(CONST(L5),2))),DRAWABOVE,画绿色
顶价赋值:REF(H,上次H>REF(H,1距今天数))
底价赋值:REF(L,上次L[
分型顶0赋值:H>1日前的顶价 AND L>1日前的底价]
分型底0赋值:L<1日前的底价 AND H<1日前的顶价
分型顶1赋值:分型顶0 AND H=HHV(H,上次分型底0距今天数)
分型底1赋值:分型底0 AND L=LLV(L,上次分型顶0距今天数)
分型顶赋值:FILTERX(分型顶1,上次分型底1距今天数)
分型底赋值:FILTERX(分型底1,上次分型顶1距今天数)
UP1赋值:上次分型底距今天数
顶力度1赋值:UP1+1日内L最高值>UP1+1日内H最低值
顶包含1赋值:COUNT(L>1日前的L,UP1)>2 AND COUNT(H>1日前的H,UP1)>2
DN1赋值:上次分型顶距今天数
底力度1赋值:DN1+1日内L最高值>DN1+1日内H最低值
底包含1赋值:COUNT(H<1日前的H,DN1)>2 AND COUNT(L<1日前的L,DN1)>2
笔顶10赋值:分型顶 AND UP1>3 AND 顶力度1 AND 顶包含1
笔底10赋值:分型底 AND DN1>3 AND 底力度1 AND 底包含1
笔顶11赋值:笔顶10 AND H=HHV(H,上次笔底10距今天数)
笔底11赋值:笔底10 AND L=LLV(L,上次笔顶10距今天数)
笔顶12赋值:笔顶11 AND H=HHV(H,上次笔底11距今天数)
笔底12赋值:笔底11 AND L=LLV(L,上次笔顶11距今天数)
笔顶1赋值:FILTERX(笔顶12,上次笔底12距今天数)
笔底1赋值:FILTERX(笔底12,上次笔顶12距今天数)
UP2赋值:上次笔底1距今天数
顶力度2赋值:UP2+1日内L最高值>UP2+1日内H最低值
顶包含2赋值:COUNT(L>1日前的L,UP2)>2 AND COUNT(H>1日前的H,UP2)>2
DN2赋值:上次笔顶1距今天数
底力度2赋值:DN2+1日内L最高值>DN2+1日内H最低值
底包含2赋值:COUNT(H<1日前的H,DN2)>2 AND COUNT(L<1日前的L,DN2)>2
笔顶20赋值:分型顶 AND UP2>3 AND 顶力度2 AND 顶包含2
笔底20赋值:分型底 AND DN2>3 AND 底力度2 AND 底包含2
笔顶21赋值:笔顶20 AND H=HHV(H,上次笔底20距今天数)
笔底21赋值:笔底20 AND L=LLV(L,上次笔顶20距今天数)
笔顶2赋值:FILTERX(笔顶21,上次笔底21距今天数)
笔底2赋值:FILTERX(笔底21,上次笔顶21距今天数)
笔顶3赋值:笔顶1 OR 笔顶2
笔底3赋值:笔底1 OR 笔底2
笔顶41赋值:FILTERX(笔顶3 AND H=HHV(H,上次笔底3距今天数),上次笔底3距今天数)
笔底41赋值:FILTERX(笔底3 AND L=LLV(L,上次笔顶3距今天数),上次笔顶3距今天数)
笔顶42赋值:FILTERX(笔顶41 AND H=HHV(H,上次笔底41距今天数),上次笔底41距今天数)
笔底42赋值:FILTERX(笔底41 AND L=LLV(L,上次笔顶41距今天数),上次笔顶41距今天数)
笔顶431赋值:笔顶42 AND (上次笔底42距今天数>1 OR 上次笔底42距今天数=DRAWNULL)
笔底431赋值:笔底42 AND (上次笔顶42距今天数>1 OR 上次笔顶42距今天数=DRAWNULL)
笔顶432赋值:笔顶431 AND (H=HHV(H,上次笔底431距今天数) OR 上次笔底431距今天数=DRAWNULL)
笔底432赋值:笔底431 AND (L=LLV(L,上次笔顶431距今天数) OR 上次笔顶431距今天数=DRAWNULL)
笔顶43赋值:FILTERX(笔顶432,上次笔底431距今天数)
笔底43赋值:FILTERX(笔底432,上次笔顶431距今天数)
笔顶441赋值:笔顶43 AND (上次笔底43距今天数>2 OR 上次笔底43距今天数=DRAWNULL)
笔底441赋值:笔底43 AND (上次笔顶43距今天数>2 OR 上次笔顶43距今天数=DRAWNULL)
笔顶442赋值:笔顶441 AND (H=HHV(H,上次笔底441距今天数) OR 上次笔底441距今天数=DRAWNULL)
笔底442赋值:笔底441 AND (L=LLV(L,上次笔顶441距今天数) OR 上次笔顶441距今天数=DRAWNULL)
笔顶44赋值:FILTERX(笔顶442,上次笔底441距今天数)
笔底44赋值:FILTERX(笔底442,上次笔顶441距今天数)
笔顶451赋值:笔顶44 AND (上次笔底44距今天数>3 OR 上次笔底44距今天数=DRAWNULL)
笔底451赋值:笔底44 AND (上次笔顶44距今天数>3 OR 上次笔顶44距今天数=DRAWNULL)
笔顶452赋值:笔顶451 AND (H=HHV(H,上次笔底451距今天数) OR 上次笔底451距今天数=DRAWNULL)
笔底452赋值:笔底451 AND (L=LLV(L,上次笔顶451距今天数) OR 上次笔顶451距今天数=DRAWNULL)
笔顶45赋值:FILTERX(笔顶452,上次笔底452距今天数)
笔底45赋值:FILTERX(笔底452,上次笔顶452距今天数)
DN511赋值:上次笔顶45距今天数
底力度511赋值:DN511+1日内L最高值>DN511+1日内H最低值
底包含511赋值:COUNT(H<1日前的H,DN511)>2 AND COUNT(L<1日前的L,DN511)>2
笔底511赋值:笔底43 AND (笔底45<>1) AND DN511>3 AND 底力度511 AND 底包含511 AND (L=LLV(L,上次笔顶45距今天数))
笔底51赋值:FILTERX(笔底511,上次笔顶45距今天数)
UP512赋值:上次笔底45距今天数
顶力度512赋值:UP512+1日内L最高值>UP512+1日内H最低值
顶包含512赋值:COUNT(L>1日前的L,UP512)>2 AND COUNT(H>1日前的H,UP512)>2
笔顶512赋值:笔顶43 AND (笔顶45<>1) AND UP512>3 AND 顶力度512 AND 顶包含512 AND (H=HHV(H,上次笔底45距今天数))
笔顶51赋值:FILTERX(笔顶512,上次笔底45距今天数)
笔顶521赋值:笔顶45 OR 笔顶51
笔底521赋值:笔底45 OR 笔底51
笔顶52赋值:FILTERX(笔顶521 AND H=HHV(H,上次笔底521距今天数),上次笔底521距今天数)
笔底52赋值:FILTERX(笔底521 AND L=LLV(L,上次笔顶521距今天数),上次笔顶521距今天数)
UP53赋值:上次笔底52距今天数
顶力度53赋值:UP53+1日内L最高值>UP53+1日内H最低值
顶包含53赋值:COUNT(L>1日前的L,UP53)>2 AND COUNT(H>1日前的H,UP53)>2
DN53赋值:上次笔顶52距今天数
底力度53赋值:DN53+1日内L最高值>DN53+1日内H最低值
底包含53赋值:COUNT(H<1日前的H,DN53)>2 AND COUNT(L<1日前的L,DN53)>2
笔顶53赋值:笔顶52 AND UP53>3 AND 顶力度53 AND 顶包含53 AND (H=HHV(H,上次笔底52距今天数))
笔底53赋值:笔底52 AND DN53>3 AND 底力度53 AND 底包含53 AND (L=LLV(L,上次笔顶52距今天数))
笔顶54赋值:FILTERX(笔顶53 AND H=HHV(H,上次笔底53距今天数),上次笔底53距今天数)
笔底54赋值:FILTERX(笔底53 AND L=LLV(L,上次笔顶53距今天数),上次笔顶53距今天数)
笔顶55赋值:H=HHV(H,上次笔底54距今天数) AND L>LLV(L,上次笔底54距今天数) AND BARSLAST(笔顶54)<上次笔底54距今天数 AND (BARSNEXT(笔底54)
笔底55赋值:L=LLV(L,上次笔顶54距今天数) AND H
笔顶56赋值:笔顶54 OR 笔顶55
笔底56赋值:笔底54 OR 笔底55
笔顶6赋值:FILTERX(笔顶56 AND H=HHV(H,上次笔底56距今天数),上次笔底56距今天数)
笔底6赋值:FILTERX(笔底56 AND L=LLV(L,上次笔顶56距今天数),上次笔顶56距今天数)
笔顶7赋值:笔顶6 AND 上次笔底6距今天数>3
笔底7赋值:笔底6 AND 上次笔顶6距今天数>3
笔顶赋值:上次笔顶7距今天数,NODRAW
笔底赋值:上次笔底7距今天数,NODRAW
输出NOTEXT_上笔:DRAWLINE(笔底=0,L,笔顶=0,H,0),COLOR0000FF,LINETHICK1
输出NOTEXT_下笔:DRAWLINE(笔顶=0,H,笔底=0,L,0),COLOR238E23,LINETHICK1
K赋值: 到最后交易的周期,NODRAW
DRAWNUMBER(笔顶=0,H,K),COLORLIRED,DRAWABOVE
DRAWNUMBER(笔底=0,L,K),COLORFFFF00