  
- UID
- 2
- 积分
- 2914403
- 威望
- 1407234 布
- 龙e币
- 1507169 刀
- 在线时间
- 13521 小时
- 注册时间
- 2009-12-3
- 最后登录
- 2025-3-3

|
源码如下:
- //区间多,专做多
- input:N(18,1,100,1);
- 开盘K线数:barslast(day<>ref(day,1))+1,linethick0;
- 开盘价:ref(c,开盘K线数-1),colorwhite;
- 上轨:开盘价+N,colorred;
- long:=cross(c,上轨);
- longend:=cross(开盘价,c);
- if holding=0 then buy(long,1,thisclose);
- if holding>0 then sell(longend,1,thisclose);
- if holding>0 and enterprice-c>=20 then sell(1,1,thisclose);
- if time>150500 and holding>0 then sell(1,1,thisclose);
-
- //区间空,专做空
- input:N(10,1,100,1);
- 开盘K线数:barslast(day<>ref(day,1))+1,linethick0;
- 开盘价:ref(c,开盘K线数-1),colorwhite;
- 下轨:开盘价-N,colorred;
- short:=cross(下轨,c);
- shortend:=cross(c,开盘价);
- if holding=0 then buyshort(short,1,thisclose);
- if holding<0 then sellshort(shortend,1,thisclose);
- if time>150500 and holding<0 then sellshort(1,1,thisclose);
复制代码 |
论坛官方微信、群(期货热点、量化探讨、开户与绑定实盘)
|