开多仓后,1、设置初始止损为x,
2、若盈利3atr后将止损上移至保本止损、
3、若盈利5atr后,回撤3atr平仓止盈、
4、若盈利N(N>5)atr后、回撤3atr平仓止盈
开空仓后,1、设置初始止损为x,
2、若盈利3atr后将止损上移至保本止损、
3、若盈利5atr后,回撤3atr平仓止盈、
4、若盈利N(N>5)atr后、回撤3atr平仓止盈
初始止损为x
是亏损x点还是具体的亏损了x元
X是个条件、帮忙写后面就可以了、谢谢老师!
那么atr是点数还是具体的金额?
盈利3atr
这里的atr怎么就是一个条件了?
就按照点数来用吧
3、若盈利5atr后,回撤3atr平仓止盈、
4、若盈利N(N>5)atr后、回撤3atr平仓止盈
if hhv(h,enterbars+1)>enterprice+3*atr and hhv(h,enterbars+1)<enterprice+5*atr and c<enterprice and holding>0 then sell(1,0,marketr);
if hhv(h,enterbars+1)>=enterprice+5*atr and c<hhv(h,enterbars+1)-3*atr and holding>0 then sell(1,0,marketr);
if hhv(h,enterbars+1)>enterprice+3*atr and hhv(h,enterbars+1)<enterprice+5*atr and c<enterprice and holding<0 then sellshort(1,0,marketr);
if hhv(h,enterbars+1)>=enterprice+5*atr and c<hhv(h,enterbars+1)-3*atr and holding<0 then sellshort(1,0,marketr);