龙听期货论坛's Archiver

龙听 发表于 2018-10-19 11:43

[转载]特送自用主图【混沌布林】

[code]
DRAWTEXTABS(100,20,'红色K线为多头区域'),colorred;
DRAWTEXTABS(100,40,'蓝色K线为混沌区域'),colorff0000;
DRAWTEXTABS(100,60,'绿色K线为空头区域'),color00ff00;
Y:=(HIGH+LOW)/2;
AO:=sMA(Y ,5,1 )-sMA(Y ,34,1 );
AC:=AO-sMA( AO,5,1);
ac1:=ref(AC,1);
Yy:=(HIGH+LOW)/2;
AOo:=sMA(Yy ,5,1 )-sMA(Yy ,34,1 );
ao1:=ref(aoo,1);
kk:=if(ac>ac1 and ao>ao1,5,if(ac<ac1 and ao<ao1,-5,0));
stickline(kk=5,h,l,0.5,0),colorred;
stickline(kk=5 and c>=o,c,o,10,1),colorred;
stickline(kk=5 and c<o,c,o,10,0),colorred;
stickline(kk=0,h,l,0.5,0),colorff9900;
stickline(kk=0 and c<O,c,o,10,0),colorff9900;
stickline(kk=0 and c>=O,c,o,10,1),colorff9900;
stickline(kk=-5,h,l,0.5,0),color00ff00;
stickline(kk=-5 and c>=o,c,o,10,1),color00ff00;
stickline(kk=-5 and c<o,c,o,10,0),color00ff00;
MID:=ema(c,21);
中:MID,colorwhite,linethick0;
PARTLINE(mid,mid>ref(mid,1),RGB(255,0,0),mid<ref(mid,1),RGB(0,255,0),1,RGB(0,0,255)),linethick2;
m3:ema(c,3),linethick0;
m8:ema(c,8),linethick0;
FILLRGN(m3,m8,m3>m8,rgb(200,100,0),m3<m8,rgb(0,200,100));
【布上】:ema(c,21)+2*STDDEV(c ,20),color00ff00;
【布下】:ema(c,21)-2*STDdev(c ,20),color00ff00;
Var1:=BACKSET(REF(HIGH,2)=HHV(HIGH,5),3);
Var2:=CROSS(Var1,0.9);
Var3:=BACKSET(REF(LOW,2)=LLV(LOW,5),3);
Var4:=CROSS(Var3,0.9);
drawicon(Var2,HIGH*1.01,6),Color00E40E;
drawicon(Var4,LOW*0.99,5),Color00E40E;
上分形:=REF(HIGH,BARSLAST(Var2));
STICKLINE(CLOSE,REF(HIGH,BARSLAST(Var2)),REF(HIGH,BARSLAST(Var2)),5,0),COLORMAGENTA;
下分形:=REF(LOW,BARSLAST(Var4));
STICKLINE(CLOSE,REF(LOW,BARSLAST(Var4)),REF(LOW,BARSLAST(Var4)),5,0),COLORYELLOW;
相对高低:=(c-下分形)/(上分形-下分形)*100;
分形振幅:=(上分形-下分形)/下分形*100;
DRAWTEXTREL(800,800,'向上分形:'+NUMTOSTRN(上分形,2)+'元'),colorwhite;
DRAWTEXTREL(800,850,'向下分形:'+NUMTOSTRN(下分形,2)+'元'),coloryellow;
DRAWTEXTREL(800,750,'相对高低:'+NUMTOSTRN(相对高低,2)+'%'),coloryellow;
DRAWTEXTREL(800,900,'分形振幅:'+NUMTOSTRN(分形振幅,2)+'%'),color00ff00;
[/code]

[attach]4607[/attach]

页: [1]