Rss & SiteMap

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

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

标题:[原创]顺大势逆小势策略

1楼
z7c9 发表于:2013/2/16 20:32:19

runmode:0;

lots:=1;

shortma:ma(close,5);
longma:ma(close,20);

entrylongcond:=close<shortma and close>longma;
exitlongcond:=close<longma;

entryshortcond:=close>shortma and close<longma;
exitshortcond:=close>longma;

offset:=mindiff;

if holding>=0 then begin
 if entrylongcond then
  buy(1,lots,limitr,close+offset);
end

if holding<=0 then begin
 if entryshortcond then
  buyshort(1,lots,limitr,close-offset);
end

if holding>0 then begin
 if exitlongcond then begin
  sell(1,holding,limitr,close-offset);
 end
end

if holding<0 then begin
 if exitshortcond then begin
  sellshort(1,holding,limitr,close+offset);
 end
end

盈亏:asset-500000,noaxis,linethick2;
次数:totaltrade,linethick0;
胜率:percentwin*100,linethick0;
持仓:state,linethick0;
价位:enterprice,linethick0;

2楼
RogarZ 发表于:2013/2/16 20:34:38
图片点击可在新窗口打开查看
共2 条记录, 每页显示 10 条, 页签: [1]


Powered By Dvbbs Version 8.3.0
Processed in .22656 s, 2 queries.