 
等级: 超级版主
- 注册:
- 2021-5-18
- 曾用名:
- FireScript
|
atr:"atr.atr##day";//前一个日线的atr,可自行调整atr调用
if c>=tenterprice+atr and holding=tentervol then 止盈1:sell(1,50%,market);
if c>=tenterprice+atr*1.5 and holding=0.5*tentervol then 止盈2:sell(1,(tentervol/2)*0.4,market);
if c>=tenterprice+atr*2 and holding<=0.3*tentervol then 止盈3:sell(1,(tentervol/2)*0.3,market);
if c>=tenterprice+atr*2.5 and holding<=0.1*tentervol then 止盈4:sell(1,(tentervol/2)*0.2,market);
if a then sell(1,holding,market);//满足条件a直接全部清仓
if c<tenterprice and holding<tentervol then 止损:sell(1,holding,market);//止盈一次后才能触发这个止损,否则无法触发 |
|