ma1:=ma(c,5);ma2:=ma(c,10);ma3:=ma(c,20);hh:=max(ma1,max(ma2,ma3));ll:=min(ma1,min(ma2,ma3));xg:o<ll and c>hh and cross(ma1,ref(ma1,1)) and cross(ma2,ref(ma2,1)) and cross(ma3,ref(ma3,1));(取阳线同时上穿3条均线,同时3条均线同时上拐) 20210311
ma10:=ma(c,10);ma20:=ma(c,20);周:=c#week;wma5:=ma(周,5);开仓:=?{这二个请写上} 平仓:=?enterlong:c>ma20 and c>wma5,tfilter(开仓,平仓,1);exitlong:c<ma20 and cross(ma(close,10),ma(close,5));仅供参考,祝你好运!
ma(c,5)>ref(ma(c,5),1) and ma(c,10)>ref(ma(c,10),1);,这是举5天、10天均线为例 。但是你的条件可能效果并不好,起码也已更改5天线在10天线之上,形成多头排列,公式变成:ma(c,5)>ref(ma(c,5),1) and ma(c,10)>ref(ma(c,10),1) and ma(c,5)>ma(c,10);