谢谢! 但您这只是判断向上的某一瞬间时点。如果后来走平或者回调了呢?
ma1:ma(c,20);
//a:if(ma(c,20)>ref(ma(c,20),1),1,0);//1代表走势向上,0反之
partline(ma1>ref(ma1,1),ma1,colorred);//向上的
partline(ma1<ref(ma1,1),ma1,colorgreen);//向下
partline(ma1=ref(ma1,1),ma1,COLORYELLOW);
你讲上述代码加载到K中看一下。颜色可以反映出走势。