kd:cross(c,生命线)&&cross(c,趋势线);
kk:cross(生命线,c)&&cross(趋势线,C);
pk:cross(c,MA1);
pd:cross(MA1,c);
sellshort(holding<0 and pk,holding,market);
buy(holding=0 and kd,1,market);
sell(holding>0 and pd,holding,market);
buyshort(holding=0 and kk,1,market);
加空条件:趋势线<生命线 and cross(趋势线,c);
加多条件:趋势线>生命线 and cross(c,趋势线);
加空加多都只开仓一次。怎样编写?
kd:cross(c,生命线)&&cross(c,趋势线);
kk:cross(生命线,c)&&cross(趋势线,C);
pk:cross(c,MA1);
pd:cross(MA1,c);
sellshort(holding<0 and pk,holding,market);
buy(holding=0 and kd,1,market);
sell(holding>0 and pd,holding,market);
buyshort(holding=0 and kk,1,market);
if holding=1 and 加多条件 then buy(1,1,market);
if holding=-1 and 加空条件 then buyshort(1,1,market);