Rss & SiteMap

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

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

标题:指标基础编写

1楼
q835560665 发表于:2015/3/5 12:49:23

CCI指标

 

TYP := (HIGH + LOW + CLOSE)/3;
(TYP-MA(TYP,M))/(0.015*AVEDEV(TYP,M));

 

请问如何编写,当CCI指标线 大于0轴线时平空开多,小于时平多开空?


2楼
pyd 发表于:2015/3/5 13:33:19

TYP : (HIGH + LOW + CLOSE)/3;
cci:(TYP-MA(TYP,m))/(0.015*AVEDEV(TYP,m)),NOAXIS;
if cci>0 then begin
sellshort(holding<0,holding,market);
buy(holding=0,1,market);
end
if cci<0 then begin
sell(holding>0,holding,market);
buyshort(holding=0,1,market);
end
共2 条记录, 每页显示 10 条, 页签: [1]


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