Rss & SiteMap

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

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

标题:跳空未交叉

1楼
COMBOY 发表于:2015/7/15 22:10:28
K线直接跳空越过设定
的移动平均线,没有触发cross(ma60,c),遗漏报卖单,有什么语句办法可以弥补漏洞么?
图片点击可在新窗口打开查看此主题相关图片如下:tcakgf7t4i@6dz@g8buvn@5.png
图片点击可在新窗口打开查看
[此贴子已经被作者于2015/7/15 22:12:07编辑过]
2楼
COMBOY 发表于:2015/7/15 22:57:10

if cross(ma60,c) and time>091500 and time<151000 then begin
if holding>0 then sell(1,1,limitr,ma60) ;
if holding=0   then buyshort(1,1,limitr,ma60);
end


if cross(c,ma60) and time>091500 and time<151000 then begin

if holding<0 then sellshort(1,1,limitr,ma60) ;
if holding=0  then buy(1,1,LIMITR,ma60);
end

 

 

版主能否帮我修改下上面代码,使得即使发生k线跳空,没有cross也执行买多或买空 

[此贴子已经被作者于2015/7/15 22:57:17编辑过]
3楼
jinzhe 发表于:2015/7/16 8:50:59

if cross(ma60,c) and time>091500 and time<151000 then begin
if holding>0 then sell(1,1,limitr,ma60),IGNORECHECKPRICE ;
if holding=0   then buyshort(1,1,limitr,ma60),IGNORECHECKPRICE;
end


if cross(c,ma60) and time>091500 and time<151000 then begin

if holding<0 then sellshort(1,1,limitr,ma60) ,IGNORECHECKPRICE;
if holding=0  then buy(1,1,LIMITR,ma60),IGNORECHECKPRICE;
end

4楼
COMBOY 发表于:2015/7/16 9:22:11

多谢大佬

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


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