主图
P1:=10;
P2:=20;
DRAWGBK(C>0, RGB(0,10,10),RGB(88,0,0),0,'11',0);
DRAWNUMBER(ISLASTBAR,C,C),COLORMAGENTA;
N8:=STRCAT(CON2STR(YEAR,0),' 年 ');
Y8:=STRCAT(CON2STR(MONTH,0),' 月 ');
R8:=STRCAT(CON2STR(DAY,0),' 日 ');
MAR1:=MA(CLOSE,P1);
C1:=C>=MAR1;
C2:=C<MAR1;
AA:=C1>=C2;
BB:=C2>C1;
STICKLINE(AA,C,O,3,0),COLORRED;
STICKLINE(AA,H,L,0,0),COLORRED;
STICKLINE(BB,C,O,3,0),COLOR00FF00;
STICKLINE(BB,H,L,0,0),COLOR00FF00;
STICKLINE(AA,CLOSE,OPEN,3,0),COLOR000099;
STICKLINE(AA,CLOSE,OPEN,2.2,0),COLOR0000CC;
STICKLINE(AA,CLOSE,OPEN,1.5,0),COLOR0000FF;
STICKLINE(AA,CLOSE,OPEN,0.5,0),COLORCC66FF;
STICKLINE(BB,CLOSE,OPEN,3,0),COLORFF7700;
STICKLINE(BB,CLOSE,OPEN,2.2,0),COLORFF9900;
STICKLINE(BB,CLOSE,OPEN,1.5,0),COLORFFBB00;
STICKLINE(BB,CLOSE,OPEN,0.5,0),COLORCYAN;
MAA:MAR1,COLOR00FF00,LINETHICK2;
IF(MAA>=REF(MAA,1),MAA,DRAWNULL),COLORRED,LINETHICK2;
IF(MAA<REF(MAA,1),MAA,DRAWNULL),COLORFFFFFF,LINETHICK2;
MAB:MA(CLOSE,P2),COLOR00FF00,LINETHICK2;
IF(MAB>=REF(MAB,1),MAB,DRAWNULL),COLORMAGENTA,LINETHICK2;
IF(MAB<REF(MAB,1),MAB,DRAWNULL),COLORGREEN,LINETHICK2;
SJ8:=STRCAT(STRCAT(N8,Y8), R8);
VAR2:=(2*CLOSE+HIGH+LOW)/4;
VAR3:=IF(YEAR>=2099 AND MONTH>2,0,1);
VAR4:=LLV(LOW,5);
VAR5:=HHV(HIGH,4);
VAR6:=EMA((VAR2-VAR4)/(VAR5-VAR4)*100,4)*VAR3;
VAR7:=EMA(0.667*REF(VAR6,1)+0.333* VAR6,2)*VAR3;
DRAWTEXT(CROSS(VAR6, VAR7) AND VAR6<30,L-0.05,'←低吸'),COLOR00FFFF;
DRAWTEXT(CROSS(VAR7, VAR6) AND VAR6>70,H+0.05,'←高抛'),COLOR00FFFF;
DRAWICON(CROSS(VAR6, VAR7) AND VAR6<30,L-0.05,13);
DRAWICON(CROSS(VAR7, VAR6) AND VAR6>70,H+0.05,14);
AAA:= MAA>=REF(MAA,1);{C>=MAA;}
BBB:= MAA<REF(MAA,1);{ C<MAA;}
DDD:=MAB>=REF(MAB,1);
EEE:=MAB<REF(MAB,1);
TT:=IF(ISLASTBAR,240/FROMOPEN,1);
NN:=120;
HH:=HHV(V*TT,NN);
LL:=LLV(V,NN);
最高:=CONST(HH);
最低:=CONST(LL);
最高2:=CONST(HHV(H,NN));
最低2:=CONST(LLV(L,NN));
PP:=IF((最高2*0.9-(最高2-最低2)*0.5)>CONST(LLV(L,20)),0.9,IF((最高2*0.9-(最高2-最低2)*0.5)>CONST(LLV(L,50)),0.7,0.6)),NODRAW;
RCC1:=最高2*0.9-(最高2-最低2)*PP;
最低3:=MIN(RCC1,最低2);
AA1:=最低3;
STICKLINE(AAA,AA1-0.000*AA1,AA1-0.040*AA1,4,0),COLOR0000FF;
STICKLINE(BBB,AA1-0.000*AA1,AA1-0.040*AA1,4,1),COLOR686868;
STICKLINE(DDD,AA1-0.050*AA1,AA1-0.090*AA1,4,0),COLORFF00FF;
STICKLINE(EEE,AA1-0.050*AA1,AA1-0.090*AA1,4,1),COLOR686868;
DRAWTEXT_FIX(C>0,0.5,0,0,SJ8),COLOR00FFFF;
DRAWTEXT_FIX(1,0.5,0.84,0,' A-红色均线持股 ★ ★ B-粉色均线持股'),COLOR00FFFF;
今日保护价:(REF(C,2)+REF(C,1)+O)/3,COLOR00FFFF,NODRAW;
顶点:IF(CURRBARSCOUNT<=60,CONST(IF(ISLASTBAR=1,HHV(H,BARSLAST(CURRBARSCOUNT=60)),1)),DRAWNULL),COLORRED,DOTLINE;
低点:IF(CURRBARSCOUNT<=60,CONST(IF(ISLASTBAR=1,LLV(L,BARSLAST(CURRBARSCOUNT=60)),1)),DRAWNULL),COLORMAGENTA,DOTLINE;
STICKLINE(CCI>=200 AND H>=顶点,O,C,3,0),COLORBLUE;
STICKLINE(CCI<=100 AND L<=低点,O,C,3,0),COLORYELLOW;
DRAWTEXT(ISLASTBAR,顶点,'顶点'),COLORRED;
DRAWTEXT(ISLASTBAR,低点,'低点'),COLORMAGENTA;
黄金时代副图
参数1: N, 最小: 10, 最大: 500, 缺省: 34
X_1:=REF((LOW+OPEN+CLOSE+HIGH)/4,1);
X_2:=SMA(ABS(LOW-X_1),13,1)/SMA(MAX(LOW-X_1,0),10,1);
X_3:=EMA(X_2,10);
X_4:=LLV(LOW,N);
X_5:=EMA(IF(LOW<=X_4,X_3,0),3);
X_6:=0;
DRAWGBK(1,RGB(65,105,225),RGB(139,69,19),0,24,0);
黄金时代:X_5,NODRAW,COLOR4080FF;
NOTEXTLINE1:33-黄金时代/2,COLORLIMAGENTA,LINETHICK2;
NOTEXTLINE2:33+黄金时代/2,COLORLIMAGENTA,LINETHICK2;
STICKLINE(X_5>0,MIN(33,NOTEXTLINE1*1.2),MAX(33,NOTEXTLINE2*0.8),3,0),COLOR004080;
STICKLINE(X_5>0,MIN(33,NOTEXTLINE1*1.15),MAX(33,NOTEXTLINE2*0.85),2.8,0),COLORRED;
STICKLINE(X_5>0,MIN(33,NOTEXTLINE1*1.1),MAX(33,NOTEXTLINE2*0.9),2.6,0),COLOR003AFF;
STICKLINE(X_5>0,MIN(33,NOTEXTLINE1*1.05),MAX(33,NOTEXTLINE2*0.95),2.4,0),COLOR0054FF;
STICKLINE(X_5>0,NOTEXTLINE1,NOTEXTLINE2,2.2,0),COLOR007AFF;
STICKLINE(X_5>0,NOTEXTLINE1,NOTEXTLINE2,2,0),COLOR008BFF;
STICKLINE(X_5>0,NOTEXTLINE1,NOTEXTLINE2,1.8,0),COLOR009CFF;
STICKLINE(X_5>0,NOTEXTLINE1,NOTEXTLINE2,1.5,0),COLOR0FC1FF;
STICKLINE(X_5>0,NOTEXTLINE1,NOTEXTLINE2,1,0),COLOR21D5FF;
X_7:=12;
X_8:=26;
X_9:=9;
X_10:=EMA(CLOSE,X_7)-EMA(CLOSE,X_8);
X_11:=EMA(X_10,X_9);
X_12:=(X_10-X_11)*2;
X_13:=REF(BARSLAST(X_5=HHV(X_5,15)),1)+1;
X_14:=REF(X_5,X_13);
X_15:=CROSS(MA(CLOSE,4),MA(CLOSE,18));
X_16:=MA(CLOSE,5)>MA(CLOSE,18) AND MA(CLOSE,5)>REF(MA(CLOSE,5),1) AND MA(CLOSE,18)>REF(MA(CLOSE,18),1) AND REF(EVERY(MA(CLOSE,5)<REF(MA(CLOSE,5),1) AND MA(CLOSE,18)<REF(MA(CLOSE,18),1),2),1);
X_17:=X_13<=18 AND X_5<X_14/10 AND (X_15 OR X_16) AND EVERY(X_10>X_11 AND X_10>REF(X_10,1) AND X_11>REF(X_11,1),3);
黄金:IF(X_17,MA(CLOSE,5)+(CLOSE-REF(CLOSE,4))/5,0),NODRAW,COLORRED;
X_18:=REF(BARSLAST(X_5=HHV(X_5,30)),1)+1;
X_19:=REF(X_5,X_18);
X_20:=MIN(44,X_19);
X_21:=NOTEXTLINE2;
STICKLINE(黄金,X_21+X_20*0.01,X_21+X_20*0.03,0.42,0),COLOR4080FF;
STICKLINE(黄金,X_21+X_20*0.03,X_21+X_20*0.04,0.52,0),COLOR4080FF;
STICKLINE(黄金,X_21+X_20*0.04,X_21+X_20*0.05,0.62,0),COLOR4080FF;
STICKLINE(黄金,X_21+X_20*0.05,X_21+X_20*0.06,0.82,0),COLOR4080FF;
STICKLINE(黄金,X_21+X_20*0.06,X_21+X_20*0.1,1.02,0),COLOR4080FF;
STICKLINE(黄金,X_21+X_20*0.1,X_21+X_20*0.2,1.22,0),COLOR4080FF;
STICKLINE(黄金,X_21+X_20*0.2,X_21+X_20*0.25,1.32,0),COLOR4080FF;
STICKLINE(黄金,X_21+X_20*0.25,X_21+X_20*0.27,0.82,0),COLOR4080FF;
STICKLINE(黄金,X_21+X_20*0.27,X_21+X_20*0.4,0.4,0),COLOR4080FF;
STICKLINE(黄金,X_21+X_20*0.4,X_21+X_20*0.8,0.25,0),COLOR4080FF;
STICKLINE(黄金,X_21+X_20*0.8,X_21+X_20*0.83,0.28,0),COLOR4080FF;
STICKLINE(黄金,X_21+X_20*0.83,X_21+X_20*0.87,0.28,1),COLOR4080FF;
STICKLINE(黄金,X_21+X_20*0.87,X_21+X_20*0.9,0.4,0),COLOR4080FF;
STICKLINE(黄金,X_21+X_20*0.01,X_21+X_20*0.03,0.37,0),COLORC08080;
STICKLINE(黄金,X_21+X_20*0.03,X_21+X_20*0.04,0.48,0),COLORC08080;
STICKLINE(黄金,X_21+X_20*0.04,X_21+X_20*0.05,0.58,0),COLORC08080;
STICKLINE(黄金,X_21+X_20*0.05,X_21+X_20*0.06,0.78,0),COLORC08080;
STICKLINE(黄金,X_21+X_20*0.06,X_21+X_20*0.1,0.98,0),COLORC08080;
STICKLINE(黄金,X_21+X_20*0.1,X_21+X_20*0.2,1.17,0),COLORC08080;
STICKLINE(黄金,X_21+X_20*0.2,X_21+X_20*0.24,1.28,0),COLORC08080;
STICKLINE(黄金,X_21+X_20*0.22,X_21+X_20*0.4,0.2,0),COLOR004080;
DRAWTEXT(黄金>0,X_21+X_20*1.1,VAR2STR(黄金,2)),COLORMAGENTA;
DRAWICON(黄金>0,NOTEXTLINE1-0.01,9);
流量黄金副图
指标设计依据 ,第一个交易日先有十字星线,第二个交易日阳线确认前一交易日十字星线,且流量指标趋势向好。
原理;星线显示多空趋于平衡 选择突破方向,价格突破后确认。
A☆:=DMA((H+L+C*2)/4,0.9);
B☆:=VOL/((H-L)*2-ABS(C-O));
C☆☆:=IF(C>O,B☆*(H-L),IF(C<O,B☆*(H-O+(C-L)),VOL/2))+IF(C>O,0-B☆*(H-C+(O-L)),IF(C<O,0-B☆*(H-L),0-VOL/2));
A☆☆:=C☆☆/20/1.15;
流量黄金:=A☆☆*0.618+REF(A☆☆,1)*0.382+REF(HSL,2)*0.168;
B☆☆:=EMA(流量黄金,3);
流量:=IF(B☆☆>REF(B☆☆,1),1,0);
AA☆:=(MAX(C,O)-MIN(C,O))/MIN(C,O)<0.00618;
BB☆:=(H-MAX(C,O))/MAX(C,O)>0.00382;
DD☆:=(MIN(C,O)-L)/L>0.00382;
EE☆:=(ABS(BB☆-DD☆))/C<0.00618;
星☆星:=AA☆ AND BB☆ AND DD☆ AND EE☆;
星线选:星☆星=1 AND 流量=1 AND C>O AND ABS((C-MA(C,20))/MA(C,20))>0.0382 AND H-MAX(C,O)<=MIN(C,O)-L,COLORYELLOW;
确认选:IF(REF(星线选,1)=1 AND C>=REF(C,1),1,0) AND C>O AND (C-REF(C,1))/REF(C,1)>0.00618,COLORRED;