 
等级: 超级版主
- 注册:
- 2021-5-18
- 曾用名:
|
TR1 : MAX(MAX((HIGH-LOW),ABS(REF(CLOSE,1)-HIGH)),ABS(REF(CLOSE,1)-LOW));
ATR : MA(TR1,10);
大利润:=atr*7;
//atr big profit stop
if holding>0 and ref(hhv(close,enterbars)>AVGENTERPRICE+大利润,3) then sell(1,holding,marketr);
if holding<0 and ref(llv(close,enterbars)<AVGENTERPRICE-大利润,3) then sellshort(1,holding,marketr);
// atr proterctive stop
if holding>0 and close<AVGENTERPRICE-atr*3 then sell(1,holding,marketr);
if holding<0 and close>AVGENTERPRICE+atr*3 then sellshort(1,holding,marketr);
// atr trailing stop
if holding>0 and close<hhv(close,enterbars)-atr*4 then sell(1,holding,marketr);
if holding<0 and close>llv(close,enterbars)+atr*4 then sellshort(1,holding,marketr); |
|