Rss & SiteMap

金字塔客服中心 - 专业程序化交易软件提供商 http://www.weistock.com/bbs/

专业程序化软件提供商
共2 条记录, 每页显示 10 条, 页签: [1]
[浏览完整版]

标题:后台执行程序编写

1楼
yangzw 发表于:2018/5/20 15:58:37
老师我要将以下策略与算法写成后台执行程序,请求帮助,谢谢
MH:ZIG(MA(H,6),0.4 );
MC:ZIG(MA(O,6),0.4 );
ML:ZIG(MA(L,6),0.4 );

ibk:=(ref(mc,1)<ref(mc,2) and mc>ref(mc,1)) or (ref(mh,1)<ref(mh,2) and mh>ref(mh,1) and mc>ref(mc,1) and mL>ref(mL,1)) or (ref(ml,1)<ref(ml,2) and mL>ref(mL,1) and mc>ref(mc,1) and mH>ref(mH,1));//开多条件

ilp:=(ref(mc,1)>ref(mc,2) and mc<ref(mc,1)) or (ref(mh,1)>ref(mh,2) and mc<ref(mh,1)) or (ref(ml,1)>ref(ml,2) and mc<ref(ml,1));//平多条件

isk:=(ref(mc,1)>ref(mc,2) and mc<ref(mc,1)) or (ref(mh,1)>ref(mh,2) and mh<ref(mh,1) and mc<ref(mc,1) and mL<ref(mL,1)) or (ref(ml,1)>ref(ml,2) and mL<ref(mL,1) and mc<ref(mc,1) and mH<ref(mH,1));//开空条件

ibp:=(ref(mc,1)<ref(mc,2) and mc>ref(mc,1)) or (ref(mh,1)<ref(mh,2) and mh>ref(mh,1)) or (ref(mL,1)<ref(mL,2) and mL>ref(mL,1));//平空条件
2楼
wenarm 发表于:2018/5/21 8:54:25

tbuy(ibk,1,MKT);
TSELL(ilp,1,MKT);
TBUYSHORT(ibk,1,MKT);
TSELLSHORT(ilp,1,MKT);

在你的代码后面加入上面的语句。如果你刚接触金字塔建议你从图表学起。后台需要扎实的编程基础,以及运行机制有一定了解。

共2 条记录, 每页显示 10 条, 页签: [1]


Powered By Dvbbs Version 8.3.0
Processed in 0.01953 s, 3 queries.