当价格在3根k线以上跌至中轨
解释一下这个是一种什么样的状态
m:=26;
n:=2;
s1:=12;
p1:=26;
m1:=9;
MID : MA(CLOSE,M);
UPPER: MID + N*STD(CLOSE,M);
LOWER: MID - N*STD(CLOSE,M);//这个是系统自带的boll指标
DIFF : EMA(CLOSE,S1) - EMA(CLOSE,P1);
DEA : EMA(DIFF,M1);
MACD1 : 2*(DIFF-DEA);//这个是系统自带的macd指标
shoushu:=1;//下单手数
if h>ref(h,1) and diff<ref(diff,1) and l<upper and h>upper then buyshort(holding=0,shoushu,market);
if enterbars>3 and l<mid and h>mid then sellshort(1,shoushu,market);
if enterbars>3 and l<lower and h>lower and ref(count(l<mid and h>mid,3),1) then sellshort(1,shoushu,market);
if h>ref(h,1) and diff>ref(diff,1) and l<lower and h>lower then buy(holding=0,shoushu,market);
if enterbars>3 and l<mid and h>mid then sell(1,shoushu,market);
if enterbars>3 and l<lower and h>lower and ref(count(l<mid and h>mid,3),1) then sell(1,shoushu,market);
少些了一点
count(l<mid and h>mid,3)>=1