以文本方式查看主题

-  金字塔客服中心 - 专业程序化交易软件提供商  (http://weistock.com/bbs/index.asp)
--  公式模型编写问题提交  (http://weistock.com/bbs/list.asp?boardid=4)
----  固定时间开仓。  (http://weistock.com/bbs/dispbbs.asp?boardid=4&id=81434)

--  作者:tanganquan
--  发布时间:2015/7/20 17:45:19
--  固定时间开仓。
老师,您好,请帮我设置一个股指程序模板:开仓条件:1分钟k线,9:30走完开仓,大于等于5单位线,开多,小于5单位线开空。(持仓管理):有仓位的情况下,亏10个点止损,并且反手开仓,设置10个点的浮动止损,就是 价格往我开仓的方向盈利10个点,我的止损也提高10个点,浮动止损一旦触发,也反手开仓。直到15:00  ,收盘前15:12强平所有的单子,。谢谢。
--  作者:jinzhe
--  发布时间:2015/7/21 8:43:24
--  

if time=093000 and h>=ma(c,5) then buy(holding=0,1,market);

if time=093000 and l<=ma(c,5) then buyshort(holding=0,1,market);

 

if holding>0 and l<enterprice-10*mindiff then sell(1,0,market);

if holding<0 and h>enterprice+10*mindiff then sellshort(1,0,market);

 

if time<151200 and holding>0 and enterbars>0 and l<=hhv(h,enterbars+1)-10*mindiff then begin

    sell(1,0,market);

    buyshort(holding=0,1,market);

end

 

if time<151200 and holding<0 and enterbars>0 and h>=llv(l,enterbars+1)+10*mindiff then begin

    sellshort(1,0,market);

    buy(holding=0,1,market);

end

 

if time>=151200 then begin

    sell(1,0,market);

    sellshort(1,0,market);

end


--  作者:tanganquan
--  发布时间:2015/7/23 13:01:21
--  漏单问题。
老师,您好,我按你写给我的程序化,跑模拟账号,试了几天,发现有漏单的现象,我的思路是 只要在9:00到15:00这段时间,手上一直要有单子,有有时候刚刚触发止损,他就不会反手开仓。只要漏一单,以后就不工作了。
图片点击可在新窗口打开查看此主题相关图片如下:qq图片20150723130144.png
图片点击可在新窗口打开查看

--  作者:jinzhe
--  发布时间:2015/7/23 13:09:20
--  
你发的截图也没能说明 9点到15点之间有空仓的情况,都是有持仓的
--  作者:tanganquan
--  发布时间:2015/7/23 13:12:36
--  

今天一直在跑模拟盘,就是 刚触发了止损,空单平仓了,但是多单 没有开进来。

老师,还想问下,金字塔能不能提供看价格开仓,我用的图标程序化,必须要等这根K线走完,这样滑点就比较大,特别是 我用价格做反手开仓的设置。


--  作者:jinzhe
--  发布时间:2015/7/23 13:23:39
--  

没有开多信号还是有信号有下单但是不成交?

图表交易里面开仓价格是enterprice


--  作者:tanganquan
--  发布时间:2015/7/23 13:30:40
--  

没有信号了。只止损了,没有反手继续做的信号。


--  作者:tanganquan
--  发布时间:2015/7/23 13:32:24
--  
我的思路是 只要触发止损 就反手做。手上一直有单。不管做多少个来回。
--  作者:jinzhe
--  发布时间:2015/7/23 13:36:04
--  

if time=093000 and h>=ma(c,5) then buy(holding=0,1,market);

if time=093000 and l<=ma(c,5) then buyshort(holding=0,1,market);

 

if holding>0 and l<enterprice-10*mindiff then begin

    sell(1,0,market);

    buyshort(holding=0,1,market);

end

if holding<0 and h>enterprice+10*mindiff then  begin

    sellshort(1,0,market);

    buy(holding=0,1,market);

end

 

if time<151200 and holding>0 and enterbars>0 and l<=hhv(h,enterbars+1)-10*mindiff then begin

    sell(1,0,market);

    buyshort(holding=0,1,market);

end

 

if time<151200 and holding<0 and enterbars>0 and h>=llv(l,enterbars+1)+10*mindiff then begin

    sellshort(1,0,market);

    buy(holding=0,1,market);

end

 

if time>=151200 then begin

    sell(1,0,market);

    sellshort(1,0,market);

end