等级: 超级版主
- 注册:
- 2021-5-18
- 曾用名:
|
//固定止损条件判断
ZSCOND:TAVGENTERPRICE-close>=10*MINDIFF;
//固定止损止盈下单
TSELL(ZSCOND,tbuyholding(1),MKT);
cond1:hhv(close,tenterbars(0))>tenterprice+10*mindiff and hhv(close,tenterbars(0))<tenterprice+20*mindiff and close<hhv(close,tenterbars(0))-3*mindiff;
cond2:hhv(close,tenterbars(0))>tenterprice+20*mindiff and hhv(close,tenterbars(0))<tenterprice+30*mindiff and close<hhv(close,tenterbars(0))-5*mindiff;
cond3:hhv(close,tenterbars(0))>tenterprice+30*mindiff and close<hhv(close,tenterbars(0))-8*mindiff;
if (cond1 or cond2 or cond3) and tbuyholding(1)>0 then TSELL(1,tbuyholding(1),MKT);
cond1到3,就是三个不同回落的情况 |
|