input:n1(5,1,999,1);
input:n2(10,1,999,1);
input:n3(20,1,999,1);
input:n4(60,1,999,1);
input:n5(100,1,999,1);
input:n6(300,1,999,1);
input:n7(900,1,999,1);
//input:P(26,1,100,8);
//input:S(12,5,40,4);
//input:M(9,2,60,6);
ma5:=rounds(ma(C,n1),4),COLORWHITE;
ma10:=rounds(ma(C,n2),4),COLORWHITE;
ma20:=rounds(ma(C,n3),4),COLORWHITE;
ma60:=rounds(ma(C,n4),4),COLORWHITE;
ma100:=rounds(ma(C,n5),4),COLORWHITE;
ma180:rounds(ma(c,180),4),colorwhite;
ma300:=rounds(ma(C,n6),4),COLORWHITE;
ma900:=rounds(ma(C,n7),4),COLORWHITE;
//DIFF:=EMA(C,S) - EMA(C,P),COLORWHITE,NODRAW;
//DEA:=EMA(DIFF,M),COLORWHITE,NODRAW;
//MACD1:=2*(DIFF-DEA), COLORSTICK;
//CYC:=barslast(date<>ref(date,1))+1;
//DayMa:rounds(sum(amount,CYC)/sum(vol,CYC)/multiplier,1),COLORWHITE,NODRAW;//适用日线及日线以下周期的K线,也试用所有品种
//Up:=Rounds(DYNAINFO(14)*100,2),COLORWHITE,NODRAW;
DayMa:DYNAINFO(11),COLORWHITE,NODRAW;
ZGJ:=HHV(Ref(H,1),OPENMINUTES(TIME())),NODRAW;
ZDJ:=LLV(Ref(L,1),OPENMINUTES(TIME())),NODRAW;
Duo1: Ma5>Ma60 and Ma10>Ma60 and Ma20>Ma60 and Ma60>DayMa and H>ZGJ ,COLORWHITE,NODRAW;
//NOAXIS;//,
Kong1: Ma5<Ma60 and Ma10<Ma60 and Ma20<Ma60 and Ma60<DayMa and L<ZDJ ,COLORGREEN,NODRAW;//NOAXIS;//,
Duo2:L<DayMa and L<Ma60 ,COLORGREEN,NODRAW;//NOAXIS;
Kong2:H>DayMa and H>Ma60 ,colorwhite,nodraw;
if time>=145800 and time<=150000 then begin
Duo1:=0,NODRAW;
Kong1:=0,NODRAW;
Duo2:=1,NODRAW;
Kong2:=1,NODRAW;
end
Duo:if(Duo1=1,1,if(Duo2=1,-1,0)),NODRAW;
Kong:if(Kong1=1,1,if(Kong2=1,-1,0)),NODRAW;
DRAWTEXTEX(1,1,0,0,STKLABEL+':'+Numtostr(Duo,0)+','+Numtostr(Kong,0));//
+','+Numtostr(Duo1,0)+','+Numtostr(Kong1,0));
这是一个VBA程序的分析条件,MA60大于日均价,破当日最高价,空头相反,这里表示当天最高最低价对吗?当天最高最低是从夜盘就开始到3点收盘,表示当前时间之前的最高最低价