多空通道1
2016-8-11 17:35:53点击:
AHC1:=CLOSE*VOL;
AHC2:=EMA((EMA(AHC1,3)/EMA(VOL,3)+EMA(AHC1,6)/EMA(VOL,6)+EMA(AHC1,12)/EMA(VOL,12)+EMA(AHC1,24)/EMA(VOL,24))/4,13),POINTDOT,coloryellow;
AHC22:=EMA((EMA(AHC1,27)/EMA(VOL,27)+EMA(AHC1,54)/EMA(VOL,54)+EMA(AHC1,108)/EMA(VOL,108)+EMA(AHC1,216)/EMA(VOL,216))/4,11),POINTDOT,colorwhite;
天线1:=AHC2*1.01;
天线3:=AHC2*0.97;
PARTLINE(天线1,天线1>=REF(天线1,1),RGB(255,0,0),天线1<=REF(天线1,1),RGB(0,255,0)),LINETHICK2;
PARTLINE(天线3,天线3>=REF(天线3,1),RGB(255,0,0),天线3<=REF(天线3,1),RGB(0,255,0)),LINETHICK2;
STICKLINE(天线1>REF(天线1,1),天线1,天线3,0,0),colorred;
STICKLINE(天线1<REF(天线1,1),天线1,天线3,0,0),colorgreen;
天线12:=AHC22;
天线32:=AHC22*0.97;
PARTLINE(天线12,天线12>=REF(天线12,1),RGB(255,0,255),天线12<=REF(天线12,1),RGB(0,0,255)),LINETHICK2;
PARTLINE(天线32,天线32>=REF(天线32,1),RGB(255,0,255),天线32<=REF(天线32,1),RGB(0,0,255)),LINETHICK2;
STICKLINE(天线12>REF(天线12,1),天线12,天线32,0,0),colormagenta;
STICKLINE(天线12<REF(天线12,1),天线12,天线32,0,0),colorblue;
A1:=C>REF(C,4);
NT:=BARSLASTCOUNT(A1);
TJ11:=NT=9;
TJ13:=ISLASTBAR AND BETWEEN(NT,5,8);
AY:=(BACKSET(TJ11>0,9) OR BACKSET(TJ13>0,NT))*NT;
DRAWNUMBER(AY>0,H*1.02,AY,0),COLORFF00FF;
DRAWTEXT(NT=9,H*1.03,'S'),colorgreen;
DRAWTEXT(NT=9,MAX(H,REF(C,1)),'--阻力线'),colorwhite;
BF:=MAX(H,REF(C,1))+MAX(H-L,MAX(H-REF(C,1),REF(C,1)-L));
DRAWTEXT(NT=9,BF,'--纠错'),colorwhite;
B1:=C<REF(C,4);
NT0:=BARSLASTCOUNT(B1);
TJ21:=NT0=9 ;
TJ23:=ISLASTBAR AND BETWEEN(NT0,5,8);
AY1:=(BACKSET(TJ21>0,9) OR BACKSET(TJ23>0,NT0))*NT0;
DRAWNUMBER(AY1>0,L*0.99,AY1,0),COLORFF00FF;
DRAWTEXT(NT0=9,L*0.96,'B'),colorred;
DRAWTEXT(NT0=9,MIN(L,REF(C,1)),'--支撑线'),colorwhite;
ZS:=MIN(L,REF(C,1))-MAX(H-L,MAX(H-REF(C,1),REF(C,1)-L));
DRAWTEXT(NT0=9,ZS,'--止损'),colorwhite;
空:=REF(C,1)>REF(天线3,1) AND C<天线3 AND C<REF(C,1);
多:=REF(C,1)<REF(天线1,1) AND C>天线1 AND C>REF(C,1);
空1:=空 AND COUNT(空,BARSLAST(多))=1 ;
多1:=多 AND COUNT(多,BARSLAST(空))=1;
DRAWTEXT(空1,天线1*1.04,'空'),colorgreen;
DRAWTEXT(多1,天线3*0.96,'多'),colorred;
DRAWICON(空1,天线1*1.02,5);
DRAWICON(多1,天线3*0.98,4);
KSD:=IF(O>C,O,C);
VAR121:=IF(TROUGHBARS(KSD,10,1)=1,1,0);
VAR111:=IF(PEAKBARS(KSD,10,1)=1,1,0);
STICKLINE(VAR111,C,O,9,0),coloryellow,LINETHICK1;
STICKLINE(VAR111,C,O,6,0),colorgray,LINETHICK1;
STICKLINE(VAR111,H,L,1,0),coloryellow,LINETHICK1;
STICKLINE(VAR121,C,O,9,0),COLOR9900FF,LINETHICK1;
STICKLINE(VAR121,C,O,6,0),colorwhite,LINETHICK1;
STICKLINE(VAR121,H,L,1,0),colorred,LINETHICK1;