自动C:=INDEXC;
自动H:=INDEXH;
自动L:=INDEXL;
自动O:=INDEXO;
大盘低:=CONST(LLV(自动L,叠加行指));
大盘高:=CONST(HHV(自动H,叠加行指));
大盘差:=大盘高-大盘低;
当前低:=CONST(LLV(L,叠加行指));
当前高:=CONST(HHV(H,叠加行指));
当前差:=当前高-当前低;
比:=当前差/大盘差;
大盘:当前低+(自动C-大盘低)*比,NODRAW;
变H:=当前低+(自动H-大盘低)*比;
变L:=当前低+(自动L-大盘低)*比;
变O:=当前低+(自动O-大盘低)*比;
自动HYC:=HY_INDEXC;
自动HYH:=HY_INDEXH;
自动HYL:=HY_INDEXL;
自动HYO:=HY_INDEXO;
大盘低HY:=CONST(LLV(自动HYL,叠加行指));
大盘高HY:=CONST(HHV(自动HYH,叠加行指));
大盘差HY:=大盘高HY-大盘低HY;
当前低HY:=CONST(LLV(L,叠加行指));
当前高HY:=CONST(HHV(H,叠加行指));
当前差HY:=当前高HY-当前低HY;
比HY:=当前差HY/大盘差HY;
行业:当前低HY+(自动HYC-大盘低HY)*比HY,NODRAW;
变HYH:=当前低HY+(自动HYH-大盘低HY)*比HY;
变HYL:=当前低HY+(自动HYL-大盘低HY)*比HY;
变HYO:=当前低HY+(自动HYO-大盘低HY)*比HY;
STICKLINE(CURRBARSCOUNT =叠加行指,变H,变L,0,0),COLOR888888;
STICKLINE(CURRBARSCOUNT =叠加行指,变O,大盘,2,0),COLOR888888;
STICKLINE(CURRBARSCOUNT =叠加行指 AND 大盘 =变O,变O,大盘,2,1),COLORAAAAAA;
STICKLINE(CURRBARSCOUNT =叠加行指,变HYH,变HYL,0,0),COLORYELLOW;
STICKLINE(CURRBARSCOUNT =叠加行指,变HYO,行业,2,0),COLORYELLOW;
STICKLINE(CURRBARSCOUNT =叠加行指 AND 行业 =变HYO,变HYO,行业,2,1),COLORYELLOW;
MA1:MA(CLOSE,M1)COLORWHITE;
MA2:MA(CLOSE,M2)COLORYELLOW;
MA3:MA(CLOSE,M3)COLORMAGENTA;
MA4:MA(CLOSE,M4)COLORLIBLUE;
MA5:MA(CLOSE,M5)COLORCYAN;
昨天MA1:=REF(MA1,1);
昨天MA2:=REF(MA2,1);
昨天MA3:=REF(MA3,1);
昨天MA4:=REF(MA4,1);
昨天MA5:=REF(MA5,1);
M1向上:=BARSLASTCOUNT(MA1 REF(MA1,1));
M2向上:=BARSLASTCOUNT(MA2 REF(MA2,1));
M3向上:=BARSLASTCOUNT(MA3 REF(MA3,1));
M4向上:=BARSLASTCOUNT(MA4 REF(MA4,1));
M5向上:=BARSLASTCOUNT(MA5 REF(MA5,1));
SA:=MAX(MAX(MA1,MA2),MAX(MA3,MA4));
SB:=MIN(MIN(MA1,MA2),MIN(MA3,MA4));
JD1:=MAX(MAX(MA(C,M1),MA(C,M2)),MA(C,M3));
JX1:=MIN(MIN(MA(C,M1),MA(C,M2)),MA(C,M3));
多头N:=(昨天MA1 =昨天MA2 AND 昨天MA2 =昨天MA3 AND 昨天MA3 =昨天MA4 AND 昨天MA4 =昨天MA5);
向上N:=(MA1 昨天MA1 AND MA2 昨天MA2 AND MA3 昨天MA3 AND MA4 昨天MA4 AND MA5 昨天MA5);
多头:BARSLASTCOUNT(多头N 0)COLORWHITE,NODRAW;
向上:BARSLASTCOUNT(向上N 0)COLORWHITE,NODRAW;
五线顺上N:=多头 0 AND 向上
一阳三线:(JX1/JD1*100 98.5 AND C JD1 AND O JX1 AND REF(MA(C,M3),1)/MA(C,M3) 1 AND C MA(C,M5))COLORLIRED,NODRAW;
四线粘合:100*(SA-SB)/SB,COLORYELLOW,NODRAW;
N线顺上:BARSLASTCOUNT(五线顺上N 0)COLORMAGENTA,NODRAW;
DRAWTEXT(一阳三线=1,L,' 一阳'),COLORLIRED;
显示:=黄金分割*1000-1000;
DRAWRECTREL(显示, 1,1000,1,RGB(94,38,18));{www.9m8.cn}顶}
DRAWRECTREL(显示,189,1000,189,RGB(94,38,18));{www.9m8.cn}八零九}
DRAWRECTREL(显示,374,1000,374,RGB(94,38,18));{www.9m8.cn}六一八}
DRAWRECTREL(显示,495,1000,495,RGB(94,0,0));{www.9m8.cn}半分位}
DRAWRECTREL(显示,610,1000,610,RGB(94,38,18));{www.9m8.cn}三八二}
DRAWRECTREL(显示,807,1000,807,RGB(94,38,18));{www.9m8.cn}一九一}
DRAWRECTREL(显示,999,1000,1000,RGB(94,38,18));{www.9m8.cn}底}
{www.9m8.cn}上轨趋势线}
WA1:=(REF(H,上轨+1)=HHV(H,上轨+1+1))*趋势开关;
WB1:=FILTER(WA1,上轨+1);
WC1:=BACKSET(WB1,上轨+1+1); {www.9m8.cn}高}
WD1:=FILTER(WC1,上轨+1);{www.9m8.cn}高点}
WT0:=BACKSET(ISLASTBAR,BARSLAST(WC1)+1);
WU0:=WT0 REF(WT0,1); {www.9m8.cn}前高}
WR1:=BACKSET(ISLASTBAR,BARSLAST(WD1)+1);
WS1:=WR1 REF(WR1,1); {www.9m8.cn}前一高}
WR2:=BACKSET(WS1,REF(BARSLAST(WD1),1)+2);
WS2:=WR2 REF(WR2,1); {www.9m8.cn}前二高}
WR3:=BACKSET(WS2,REF(BARSLAST(WD1),1)+2);
WS3:=WR3 REF(WR3,1); {www.9m8.cn}前三高}
压力1:DRAWLINE(WS1,H,WC1,H,1)COLOR004000;
压力2:DRAWLINE(WS2,H,WS1,H,1)COLOR004000;
压力3:DRAWLINE(WS3,H,WS2,H,1)COLOR004000,LINETHICK2;
高 :=REF(L,BARSLAST(WU0))COLOR808080,DOTLINE;
高1:REF(H,BARSLAST(WS1))COLOR808080,DOTLINE;
高2:REF(H,BARSLAST(WS2))COLOR808080,DOTLINE;
高3:=REF(H,BARSLAST(WS3))COLOR808080,DOTLINE;
{www.9m8.cn}下轨趋势线}
WA2:=(REF(L,下轨+1)=LLV(L,下轨+1+1))*趋势开关;
WB2:=FILTER(WA2,下轨+1);
WC2:=BACKSET(WB2,下轨+1+1);{www.9m8.cn}低}
WD2:=FILTER(WC2,下轨+1);{www.9m8.cn}低点}
WT:=BACKSET(ISLASTBAR,BARSLAST(WC2)+1);
WU:=WT REF(WT,1); {www.9m8.cn}前低}
WT1:=BACKSET(ISLASTBAR,BARSLAST(WD2)+1);
WU1:=WT1 REF(WT1,1); {www.9m8.cn}前一低}
WT2:=BACKSET(WU1,REF(BARSLAST(WD2),1)+2);
WU2:=WT2 REF(WT2,1); {www.9m8.cn}前二低}
WT3:=BACKSET(WU2,REF(BARSLAST(WD2),1)+3);
WU3:=WT3 REF(WT3,1); {www.9m8.cn}前三低}
下轨3:DRAWLINE(WU1,L,WC2,L,1)COLORLIRED,LINETHICK2;
下轨2:DRAWLINE(WU2,L,WU1,L,1)COLOR0080FF,LINETHICK2;
下轨1:DRAWLINE(WU3,L,WU2,L,1)COLOR0080FF,LINETHICK2;
低 :=REF(L,BARSLAST(WU))COLOR808080,DOTLINE;
低1:REF(L,BARSLAST(WU1))COLOR808080,DOTLINE;
低2:REF(L,BARSLAST(WU2))COLOR808080,DOTLINE;
低3:=REF(L,BARSLAST(WU3))COLOR808080,DOTLINE;
{www.9m8.cn}上轨信号}
向下:=BARSLASTCOUNT(高3
向上K:=BARSLASTCOUNT(高3
DRAWTEXT(向下=1,H,'向下'),COLORLIGREEN;
DRAWTEXT(向上K=1,H,'向上'),COLORLIGREEN;
下跌:=BARSLASTCOUNT(高3 高2 AND 高2 高1 AND 低2
DRAWTEXT(下跌=1,H,'下跌'),COLORLIGREEN;
回落:=BARSLASTCOUNT(高3 高2 AND 高2 高1 AND 低2
DRAWTEXT(回落=1,H,'回落'),COLORLIGREEN;
加速跌:=BARSLASTCOUNT(高3 高2 AND 高2 高1 AND 高1 高 AND 压力1 压力2);
{www.9m8.cn}正轨信号}
上升:=BARSLASTCOUNT(低2
下降:=BARSLASTCOUNT(低2
DRAWTEXT(上升=1,L,'上升'),COLORMAGENTA;
DRAWTEXT(下降=1,L,'下降'),COLORGREEN;
转强:=BARSLASTCOUNT(低2
转弱:=BARSLASTCOUNT(低2
DRAWTEXT(转强=1,L,'转强'),COLORMAGENTA;
DRAWTEXT(转弱=1,L,'转弱'),COLORGREEN;
KQW:=CONST(C);
加速上:=BARSLASTCOUNT(低
加速涨:BARSLAST(加速上=1 AND KQW 下轨3 AND 下轨3 下轨2 AND 下轨2 REF(下轨2,1) AND 高1 高2),COLORYELLOW,NODRAW;
反弹:=BARSLASTCOUNT(低3 低2 AND 低2 低1 AND 低1
STICKLINE(CLOSE =OPEN,CLOSE,HIGH,0,0), COLORRED;
STICKLINE(CLOSE =OPEN,OPEN,LOW,0,0), COLORRED;
STICKLINE(CLOSE OPEN,OPEN,HIGH,0,0), COLOR00EC00;
STICKLINE(CLOSE OPEN,CLOSE,LOW,0,0), COLOR00EC00;
STICKLINE(CLOSE =OPEN,CLOSE,OPEN,2.9.2,0),COLOR0000A1;
STICKLINE(CLOSE =OPEN,CLOSE,OPEN,1.9.2,0),COLOR0000B5;
STICKLINE(CLOSE =OPEN,CLOSE,OPEN,0.9.8,0),COLOR0000C5;
STICKLINE(CLOSE =OPEN,CLOSE,OPEN,0.4,0),COLOR0000D4;
STICKLINE(CLOSE =OPEN,CLOSE,OPEN,0.2,0),COLOR0000FF;
STICKLINE(CLOSE OPEN,CLOSE,OPEN,2.9.2,0),COLOR009000;
STICKLINE(CLOSE OPEN,CLOSE,OPEN,1.9.2,0),COLOR00B400;
STICKLINE(CLOSE OPEN,CLOSE,OPEN,0.9.8,0),COLOR00C100;
STICKLINE(CLOSE OPEN,CLOSE,OPEN,0.4,0),COLOR00DB00;
STICKLINE(CLOSE OPEN,CLOSE,OPEN,0.2,0),COLOR00EC00;
涨停:=(CLOSE/REF(C,1) =1.09)AND C=H;
STICKLINE(涨停,L,H,0,0),COLORYELLOW;
STICKLINE(涨停,CLOSE,OPEN,2.9.2,0),COLOR00AAFF;
STICKLINE(涨停,CLOSE,OPEN,1.9.2,0),COLOR00CCFF;
STICKLINE(涨停,CLOSE,OPEN,0.9.8,0),COLOR00FFFF;
跌停:=(C/REF(C,1) =0.91)AND C=L;
STICKLINE(跌停,L,H,0,0),COLORGREEN;
STICKLINE(跌停,CLOSE,OPEN,2.9.2,0),COLOR009000;
STICKLINE(跌停,CLOSE,OPEN,1.9.2,0),COLOR00B400;
STICKLINE(跌停,CLOSE,OPEN,0.9.8,0),COLOR00C100;
DRAWTEXT(加速涨,L,'加速涨')COLORYELLOW;
DRAWTEXT(反弹=1,L,'反弹'),COLORYELLOW;
DRAWTEXT(加速跌=1,H,'加速跌'),COLORLIGREEN;
DRAWTEXT_FIX(CURRBARSCOUNT=黄金分割,0.0,0.160,0,'80.9%')COLOR0000F7;
DRAWTEXT_FIX(CURRBARSCOUNT=黄金分割,0.0,0.345,0,'61.8%')COLOR0000F7;
DRAWTEXT_FIX(CURRBARSCOUNT=黄金分割,0.0,0.465,0,' 50%')COLORYELLOW;
DRAWTEXT_FIX(CURRBARSCOUNT=黄金分割,0.0,0.580,0,'38.2%')COLOR0000F7;
DRAWTEXT_FIX(CURRBARSCOUNT=黄金分割,0.0,0.780,0,'19.1%')COLOR0000F7;