网友求助:
打算用轨道指标做一个选股
思路是
N日内首次摸到上轨的股
这里我还有一个疑问
这个“摸”上轨,是用C呢还是H呢
补充源码
AA:=MA((2*CLOSE+HIGH+LOW)/4,5);
通1:=AA*102/100;
通2:=AA*(200-102)/100;
CC:=ABS((2*CLOSE+HIGH+LOW)/4-MA(CLOSE,20))/MA(CLOSE,20);
DD:=DMA(CLOSE,CC);
上:(1+7/100)*DD,CROSSDOT,COLORFF1CAE;
下:(1-7/100)*DD,CROSSDOT,COLOR00FF7F;
中:(上+下)/2,CROSSDOT,COLORCFB53B;
解答如下:
CC:=ABS((2*CLOSE+HIGH+LOW)/4-MA(CLOSE,20))/MA(CLOSE,20);
DD:=DMA(CLOSE,CC);
上:=(1+7/100)*DD;
COUNT(H>=上,N)>0;