时段:=date>=1101227 and date<=1101231;最高价:const(hhv(h*时段,0)),nodraw;if(date>=1101227,最高价,draw**);选股:abs(c-const(hhv(h*(date>=1101227 and date<=1101231),0)))/const(hhv(h*(date>=1101227 ...
比如均线的,用zig代码来判断如5日均线的上拐就可以通过以下代码来实现:ma5:ma(close,5);上拐:=zig(ma5,n)>ref(zig(ma5,n),1) and ref(zig(ma5,n),1)<ref(zig(ma5,n),2);n的参数:1 105 5;参数越大,信号越少,成功率越高。注意,这是未来函数。
{n:(1950,2100,2013);y:(1,12,3);r:(1,31,25);将以上参数输入参数栏内,参数n\y\r分别表示年、月、日,可以自由调整} 指定日期:=year=n and month=y and day=r;指定均线:=expma(c,x);cross(c,指定均线)and 指定日期;
下载最新的5分钟数据,选股周期设为5分钟进行选股。ma(c,5)>ref(ma(c,5),1) and ma(c,10)>ref(ma(c,10),1) and ma(c,20)>ref(ma(c,20),1) and ma(c,30)>ref(ma(c,30),1) and ma(c,40)>ref(ma(c,40),1) and ma(c,50)>ref(ma(c,50),1) ;