请老师在主图出现k线在趋势线上时并且趋势线也变成红色时三个条件同时成立出选股。谢谢
图例
主图源码
a:=DYNAINFO(7);{
a+a*0.1,DOTLINE,colorAA7700;
a+a*0,DOTLINE,colorAA7700;
a+a*-0.1,DOTLINE,colorAA7700;
}
DRAWTEXTABS(0,0,BKNAME ),colorAAAAAA;
DRAWTEXTABS(0,15,'流通盘:'+CAPITAL/100+'万股,利润增长:'+FINANCE2(10)+'%。每股收益:'+FINANCE2(3)+'元;市盈率:'+DYNAINFO(39)+'。' ),coloraaaaaa;
DRAWTEXTABS(0,30,'每股净资产:'+FINANCE2(4)+'元;每股公积金:'+FINANCE2(7)+'元;主营收入同比:'+FINANCE2(11)+'%。'),coloraaaaaa;
DRAWTEXTABS(0,45,'切勿在下跌势中建仓!'),color00eeee;
ma5:=ma(c,5);
ma13:=ma(c,9.98);
stickline(c<o,c,o,7,1),coloreeee00;
stickline(c>=ma13 and c>=o,c,o,7,0),color0000ff;
S1:=NUMTOSTRN(ref(c,1)*1.1,2);
S2:=NUMTOSTRN(c,2);
涨停:=STRCMP(s1,s2)=0;
涨幅:=(c-ref(c,1))/ref(c,1)*100;
drawtext(涨停,l,'涨停'),colorffffff;
stickline(c<ma13 ,c,o,9,0),color000000;
stickline(c<ma13 ,h,l,1,0),color000000;
stickline(c>=o and c<ma13 and BARSTATUS=2 ,o,c,7,0),color000077;
stickline(c>=o and c<ma13 and BARSTATUS=2 ,h,l,1,0),color000077;
stickline(o>c and c<ma13 and BARSTATUS=2 ,o,c,7,1),color777700;
stickline(o>c and c<ma13 and BARSTATUS=2 ,h,l,1,1),color777700;
{
gjpl:=c-ma13;
在此建仓:gjpl>ref(gjpl,1) and c<ma13,linethick0,color999999;
stickline(在此建仓,h,l,1,0),color999999;
stickline(在此建仓,c,o,9,1),color999999;
jq:=FILTER(在此建仓,4) and ma13>ref(ma13,5);
drawtext(jq,l,'在此建仓'),coloraa9900;
}
{
tj:=ma13>ref(ma13,1) and ref(ma13,1)<ref(ma13,2);
VERTLINE(tj ,1 ),color997700,layer5;
}
zlx:ma13,colorffaa00,LAYER1;
TT:zlx>ref(zlx,1),linethick0;
PARTLINE(ma13,tt,rgb(255,0,0)),LAYER0;
ma13,colorffffff,LAYER0,DOTLINE;
b:cross(c,ma13),linethick0;
t:last(c>ma13),linethick0;
pl:c-ma13,linethick0;
stickline(b,c,o,2,0),color00ffff;
STICKLINE(A<B,A,B,5,0),COLORBLUE;