Rss & SiteMap

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

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

标题:为什么我的交易系统在某个价位上就不做空,某个价位下就做空??

1楼
gongxiangban 发表于:2012/10/21 20:38:03
如附件中,。

为什么在3771到3765区间 一下才做空??

上方就不做空?


我根本没有审定这个区间参数啊。

图片点击可在新窗口打开查看
[此贴子已经被作者于2012-10-21 20:39:30编辑过]
2楼
gongxiangban 发表于:2012/10/21 20:39:17
图片点击可在新窗口打开查看
3楼
gongxiangban 发表于:2012/10/21 21:00:05
就是那个灰色的线,
4楼
gongxiangban 发表于:2012/10/21 22:10:17
代码是这样的


short:=close[DATACOUNT-1]>MA1 and close<=MA1-10*MINDIFF  and MACD<0 and MACD5>0 and holding =0;
if short then
begin 
 flag :=1;
 stloss :=maxlow;
 stprice := close - (maxlow -close );
 buyshort(holding=0,lots,THISCLOSE);
end;
if (close <stprice and flag=1 and holding <0) then 
begin
sellshort(holding<0,lots/2,THISCLOSE);
flag :=0;
stloss := close + (maxlow - close)/2.0;
end;
if ((MA1+MINDIFF*STOPLINE <close or close> stloss )and holding<0 ) THEN
begin
   sellshort(holding<0,-holding,THISCLOSE);
   flag:=0;
end;

5楼
gongxiangban 发表于:2012/10/21 22:36:05
问题已经解决了

datacount的问题


改成ref(close,1) 就可以了
共5 条记录, 每页显示 10 条, 页签: [1]


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