仿红绿k线 纯属娱乐 源码
ma1:ma(c,5);
ma2:ma(c,10);
ma3:MA(CLOSE,30);
STICKLINE(c>0,o,c,8,0), ColorGREEN;
STICKLINE(c>0,h,l,0.8,0) , ColorGREEN;
a:=close>ma1 and CLOSE>ma2 ;
b:=close>ma1 and CLOSE<ma2 and CLOSE>ma3;
STICKLINE(a>0,o,c,8,0) , COLORred;
STICKLINE(a>0,h,l,0.8,0), COLORred;
STICKLINE(b>0,h,l,0.8,0), ColorGREEN;
STICKLINE(b>0,o,c,8,0), ColorGREEN;
IF BARSTATUS=2 and c<800 and a THEN
DRAWTEXTABS(390,26,'红k线,当前处于持股阶段。 '),color0000FF,LINETHICK3;
IF BARSTATUS=2 and c<800 and c<ma2 THEN
DRAWTEXTABS(390,26,'绿k线,当前处于持币阶段。 '),ColorGREEN,LINETHICK3;
IF BARSTATUS=2 and c>800 and a THEN
DRAWTEXTABS(390,26,'红k线,大盘当前处于持股阶段。 '),color0000FF,LINETHICK3;
IF BARSTATUS=2 and c>800 and c<ma2 THEN
DRAWTEXTABS(390,26,'绿k线,大盘当前处于持币阶段。 '),ColorGREEN,LINETHICK3;
{大量:=HHV(V,20 );
天数:BARSLAST(v=大量),LINETHICK0;
大量收盘价:REF(C,天数),LINETHICK0;
STICKLINE( 大量收盘价 and 天数>0,大量收盘价,大量收盘价,20,0),ColorFF9900;};