刚看火伞发的金K线,也整一个金K线。改来改去花了一下午外加中午1小时。发上来,供指标发烧友之用,新手慎用。
编写思路主要是K线叠加取势。。因多次修改,删除了加密附件,各位版主见谅。
勿用于任何商业用途,只供指标研习之用
{金K线}
VAR8Q:=(2*CLOSE+HIGH+LOW)/4;
VAR9Q:=EXPMA(EXPMA(EXPMA(VAR8Q,2),3),3);
J:=(VAR9Q-REF(VAR9Q,1))*100, COLORSTICK;
D1:=SMA(J,3,1);
KX:=SMA(J,2,1);
A11:=EMA(CLOSE,2),COLORWHITE;
A21:=EMA(CLOSE,5);
N1:=3;M1:=13;M11:=5;M21:=5;
A31:=EMA(CLOSE,12);
A41:=EMA(CLOSE,25);
B1:=A11>REF(A11,1);
S:=A11REF(A11,2) ;
BA1:=OREF(MAX(C,O),1) AND C/REF(C,1)>1.0222;
STICKLINE(V>0,L,H,0,0),COLORCYAN;
STICKLINE(V>0,C,O,3,0),COLORCYAN;
STICKLINE(B1 ,H,L,0,0),COLORYELLOW;
STICKLINE(B1 ,O,C,-1,0),COLOR6633EE;
STICKLINE(B1 ,O,C,2.7,0),COLOR3666EE;
STICKLINE(B1 ,O,C,2.1,0),COLOR2299EE;
STICKLINE(B1 ,O,C,1.4,0),COLOR11AAEF;
STICKLINE(B1 ,O,C,0.8,0),COLOR00BBFE;
STICKLINE(B1 ,O,C,0.4,0),COLOR00CCFE;
STICKLINE(B1 ,O,C,0.24,0),COLOR00DDFF;
STICKLINE(B1 ,O,C,0.1,0),COLOR00EEFF;
STICKLINE(B1 ,O,C,0.05,0),COLOR00FFFF;
B2:=C>REF(O,1) ;
STICKLINE(B2,H,L,0,0),COLORYELLOW;
STICKLINE(B2,O,C,-1,0),COLOR6633EE;
STICKLINE(B2,O,C,2.7,0),COLOR3666EE;
STICKLINE(B2,O,C,2.1,0),COLOR2299EE;
STICKLINE(B2,O,C,1.4,0),COLOR11AAEF;
STICKLINE(B2,O,C,0.8,0),COLOR00BBFE;
STICKLINE(B2,O,C,0.4,0),COLOR00CCFE;
STICKLINE(B2,O,C,0.24,0),COLOR00DDFF;
STICKLINE(B2,O,C,0.1,0),COLOR00EEFF;
STICKLINE(B2,O,C,0.05,0),COLOR00FFFF;
P121:=((C+O)/2+0.618*H+1.382*L)/3;
M3:=MA(P121,3);M9:=MA(P121,9);M17:=MA(P121,17);M29:=MA(P121,29);
{3日下穿9日}
B3:=CROSS(MA(P121,9),MA(P121,3));
STICKLINE(B3,H,L,0,0),COLORCYAN;
STICKLINE(B3,O,C,3,0),COLORCYAN;
{昨天B1 今天C>M3}
B4:=REF(B1=1 OR B2=1,1) AND C>M3;
STICKLINE(B4,H,L,0,0),COLORYELLOW;
STICKLINE(B4,O,C,-1,0),COLOR6633EE;
STICKLINE(B4,O,C,2.7,0),COLOR3666EE;
STICKLINE(B4,O,C,2.1,0),COLOR2299EE;
STICKLINE(B4,O,C,1.4,0),COLOR11AAEF;
STICKLINE(B4,O,C,0.8,0),COLOR00BBFE;
STICKLINE(B4,O,C,0.4,0),COLOR00CCFE;
STICKLINE(B4,O,C,0.24,0),COLOR00DDFF;
STICKLINE(B4,O,C,0.1,0),COLOR00EEFF;
STICKLINE(B4,O,C,0.05,0),COLOR00FFFF;
{墓碑K线}
B5:=O>REF(MAX(C,O),1) AND C
STICKLINE(B5,H,L,0,0),COLORCYAN;
STICKLINE(B5,O,C,3,0),COLORCYAN;
B6:=C
STICKLINE(B6,O,C,3,0),COLORCYAN;
B9:=C>M3 AND C>M9 AND C>M17 AND C>M29; B10:=O/C-1>=0.0311;
排序1:MAX(M3,MAX(M9,MAX(M17,M29)));
排序5:MIN(M3,MIN(M9,MIN(M17,M29)));
排序3:((M3+M9+M17+M29)-排序1-排序5)/2;
排序2:(排序3+排序1)/2;
排序4:(排序3+排序5)/2;
B7:=REF(C
STICKLINE(B7=1 OR B7B,O,C,3,0),COLORCYAN;
B11:=C<排序4 AND C
STICKLINE(B8=1 OR B10 OR B11 OR B12,H,L,0,0),COLORCYAN;
STICKLINE(B8=1 OR B10 OR B11 OR B12,O,C,3,0),COLORCYAN;
STICKLINE((B9 AND B10=0) OR BA1,H,L,0,0),COLORYELLOW;
STICKLINE((B9 AND B10=0) OR BA1,O,C,3,0),COLORYELLOW;