以文本方式查看主题 - 金字塔客服中心 - 专业程序化交易软件提供商 (http://weistock.com/bbs/index.asp) -- 金字塔软件问题提交 (http://weistock.com/bbs/list.asp?boardid=2) ---- 突破后第一次回调到5日均线买入 (http://weistock.com/bbs/dispbbs.asp?boardid=2&id=61963) |
-- 作者:nicko -- 发布时间:2014/2/24 12:11:45 -- 突破后第一次回调到5日均线买入 请问突破后第一次回调到5日均线买入如何写法? |
-- 作者:qwer123 -- 发布时间:2014/2/24 12:58:14 -- 股指期货: 1.突破后回调到5日均线上方0.2点时买入
r1:=ma(c,5);
if cross(c,r1) then k1:=1;
if cross(r1,c) then k1:=-1;
r2:=barslast(c<r1);
r3:=ref(r1,1)
if k1>0 and r2>3 and l-ref(r1,1)<=0.2 then buy(holding=0,1,limitr,r3+0.2);
2.收盘价回调到5日均线的下方买入
r1:=ma(c,5);
if cross(c,r1) then k1:=1;
if cross(r1,c) then k1:=-1; r2:=barslast(c>r1);
if k1<0 and r2=1 then buy(holding=0,1,limitr,c);
|
-- 作者:lichenghu -- 发布时间:2014/2/24 13:54:55 -- r5表示什么? |
-- 作者:zca12 -- 发布时间:2014/2/24 14:00:42 -- ma5:=(callstock(stklabel,vtopen,6,0)+callstock(stklabel,vtopen,6,-1)+callstock(stklabel,vtopen,6,-2) +callstock(stklabel,vtopen,6,-3)+callstock(stklabel,vtopen,6,-4))/5; if holding=0 then begin buy(L<ma5,1,market); end if holding=0 then begin buyshort(H>ma5,1,market); end if enterbars>openminutes(time) then begin sell(holding>0,holding,market); sellshort(holding<0,holding,market); end 回踩5天线开仓,第二天开盘平仓。
|
-- 作者:qwer123 -- 发布时间:2014/2/24 14:09:39 -- 以下是引用lichenghu在2014/2/24 13:54:55的发言:
r5表示什么? 应该是r1, |