编写要求:
www.gszx.com.cn网解答:
网友求助:
我用的趋势买卖源码如下:N:1,100,20 M:1,100,32 P1:1,100,80 P2:1,100,100
VAR1:=(C+H+O+L)/4;
卖出:XMA(VAR1,N)*(1+P1/1000),COLORGREEN,LINETHICK2;
买入:XMA(VAR1,M)*(1-P2/1000),COLORMAGENTA,LINETHICK2;
幅度:100*(卖出-买入)/买入,NODRAW;
MA1:=MA(VAR1,3);
STICKLINE(卖出>LOW AND 卖出<HIGH,卖出,MAX(卖出,MAX(OPEN,CLOSE)),3,0),COLORGREEN;
STICKLINE(卖出>MIN(C,O) AND 卖出<MAX(C,O),卖出,MAX(OPEN,CLOSE),3,0),COLORGREEN;
STICKLINE(卖出>LOW AND 卖出<HIGH,卖出,HIGH,0,0),COLORGREEN;
STICKLINE(卖出<LOW,OPEN,CLOSE,3,0),COLORGREEN;
STICKLINE(卖出<LOW,HIGH,LOW,0,0),COLORGREEN;
STICKLINE(买入>LOW AND 买入<HIGH,买入,MIN(MIN(OPEN,CLOSE),买入),3,0),COLORMAGENTA;
STICKLINE(买入>MIN(C,O) AND 买入<MAX(C,O),买入,MIN(OPEN,CLOSE),3,0),COLORMAGENTA;
STICKLINE(买入>LOW AND 买入<HIGH,买入,LOW,0,0),COLORMAGENTA;
STICKLINE(买入>HIGH,OPEN,CLOSE,3,0),COLORMAGENTA;
STICKLINE(买入>HIGH,HIGH,LOW,0,0),COLORMAGENTA;
DRAWTEXT(CROSS(LOW,买入),LOW*0.95,'B'),COLORRED,LINETHICK2;
DRAWTEXT(CROSS(卖出,HIGH),HIGH*1.02,'S'),COLORGREEN;
用的选股公式为:{OK.连续3天粉K出现}
M:=32;P2:=100;
VAR1:=(C+H+O+L)/4;
买入:=XMA(VAR1,M)*(1-P2/1000);
EVERY(C<买入,3);
和{OK.连续1天粉K出现}
M:=32;P2:=100;
VAR1:=(C+H+O+L)/4;
买入:=XMA(VAR1,M)*(1-P2/1000);
EVERY(C<买入,1);但是此公式并不能选出2012.1.31到2.2的大成股份,请教各位高手有什么办法没,或者告诉我为什么选不出来。或者还有别的选股公式吗?我用了很多方法都没有选出1月31号的大成股份!!!
解答如下:
XMA未来函数
{连续3天粉K出现}
M:=32;P2:=100;
VAR1:=(C+H+O+L)/4;
买入:=XMA(VAR1,M)*(1-P2/1000);
EVERY(买入>HIGH,3);