以文本方式查看主题 - 金字塔客服中心 - 专业程序化交易软件提供商 (http://weistock.com/bbs/index.asp) -- 程序化交易实盘俱乐部 (http://weistock.com/bbs/list.asp?boardid=9) ---- 创丰1号策略(代码公开) (http://weistock.com/bbs/dispbbs.asp?boardid=9&id=66170) |
-- 作者:dls0760 -- 发布时间:2014/6/16 8:46:12 -- 创丰1号策略(代码公开)
原帖已经被转移至 策略发布区, 讨论请去 http://www.weistock.com/bbs/dispbbs.asp?boardid=10&Id=66189
创丰1号代码公开如下:
abb:=not(islastbar) or (islastbar and tholding2=0); 创丰1号-A:VALUEWHEN(TIME=0916,O),COLORMAGENTA; DIFF := EMA(CLOSE,12) - EMA(CLOSE,26); VARIABLE: aspect=0; RUNMODE:0; if barpos = 0 then if aspect = 0 then aspect:= 1; if l - stopnum > stopprice then if aspect = 1 then if h >= stopprice then aspect:= 0; if h + stopnum < stopprice then
手数:=1;
STICKLINE(C>stopprice,LOW,HIGH,0.1,1),COLORRED;
BUY1:=(K>REF(K,1)&&D<REF(D,1)&&J>REF(J,1))&&C>stopprice&&time>0915&&time<=1510 and macd1>ref(macd1,1) and holding<=0 ; VARIABLE:DUOKONG=0; VARIABLE:YDZY=1; IF HOLDING<0 THEN BEGIN IF a1 THEN BEGIN IF YDZY=1 THEN BEGIN IF L<LOWPRICE THEN BEGIN IF ENTERPRICE-LOWPRICE>=KYLDS and c-ENTERPRICE<=-0.2 THEN BEGIN IF Z3B1=1 THEN BEGIN END IF HOLDING=0 THEN BEGIN IF HOLDING>0 THEN BEGIN IF a2 THEN BEGIN IF YDZY=1 THEN BEGIN IF H>HIGHPRICE THEN BEGIN IF HIGHPRICE-ENTERPRICE>=DYLDS and c-ENTERPRICE>=0.2 THEN BEGIN END IF HOLDING=0 THEN BEGIN
IF time>=1513 THEN BEGIN |
-- 作者:redchina888 -- 发布时间:2014/6/16 9:24:20 -- 学习 |
-- 作者:dls0760 -- 发布时间:2014/6/16 9:57:23 -- 策略采用收盘价设计,包含移动止损/止盈,不含限价/偷价/未来涵数。 |