人人爽天天爽夜夜爽qc-人人爽天天爽夜夜爽曰-人人天天爱天天做天天摸-人人天天夜夜-色网站在线-色网站在线看

您現在的位置:程序化交易>> 期貨公式>> (MC)multicharts>> MC知識>>正文內容

請問老師關于日內多次突破交易的問題 [MC]

  • MC用戶求助:

    關于swinghigh函數的用法,您可以先看一下帖子http://forums.icetech.com.cn/for ... &extra=page%3D1,在學習這個帖子的過程中遇到的問題可以直接在該帖子下方回帖。

    ?

    另外,關于您的這個策略需求,我簡單在您的代碼中加了幾行代碼,如下:

    input:btime(0930),etime(1445);

    var:thigh(0),tlow(0),mp(0);

    if date<>date[1] then begin

    ? ? mp=0;

    ? ? thigh=0;

    ? ? tlow=0;

    ? ?end;

    if time=btime then begin

    ? ? thigh=highd(0);

    ? ? tlow=lowd(0);

    ? ? end;

    mp=marketposition;

    if time>btime and time<etime then begin

    ? ? if mp=0 and close cross above thigh then begin

    ? ? ? ?buy ("b1")next bar at thigh stop;

    ? ? ? ? end;

    ? ? if mp=1 then sell("sp") next bar at tlow stop;

    ?

    ? ? if mp=0 and close cross under tlow then begin

    ? ? ? ? sellshort ("s1")next bar at tlow stop;

    ? ? ? ? end;

    ? ? if mp=-1 then buytocover("bp") next bar at thigh stop;

    //增加

    ? ? if mp=0 and mp[1]<>0 then begin

    ? ? ? ? ? ? thigh=highd(0);

    ? ? ? ? ? ? tlow=lowd(0);

    ? ? end;

    //增加

    {這個地方,是一個即時的代碼,也就是當前一根bar上持倉,而當根bar未持倉,那么重新賦值thigh和tlow,后續的進場會根據這兩個新的值進行進場和出場了}

    end;

    ?

  • MC回復討論一:

    關于swinghigh函數的用法,您可以先看一下帖子http://forums.icetech.com.cn/for ... &extra=page%3D1,在學習這個帖子的過程中遇到的問題可以直接在該帖子下方回帖。

    ?

    另外,關于您的這個策略需求,我簡單在您的代碼中加了幾行代碼,如下:

    input:btime(0930),etime(1445);

    var:thigh(0),tlow(0),mp(0);

    if date<>date[1] then begin

    ? ? mp=0;

    ? ? thigh=0;

    ? ? tlow=0;

    ? ?end;

    if time=btime then begin

    ? ? thigh=highd(0);

    ? ? tlow=lowd(0);

    ? ? end;

    mp=marketposition;

    if time>btime and time<etime then begin

    ? ? if mp=0 and close cross above thigh then begin

    ? ? ? ?buy ("b1")next bar at thigh stop;

    ? ? ? ? end;

    ? ? if mp=1 then sell("sp") next bar at tlow stop;

    ?

    ? ? if mp=0 and close cross under tlow then begin

    ? ? ? ? sellshort ("s1")next bar at tlow stop;

    ? ? ? ? end;

    ? ? if mp=-1 then buytocover("bp") next bar at thigh stop;

    //增加

    ? ? if mp=0 and mp[1]<>0 then begin

    ? ? ? ? ? ? thigh=highd(0);

    ? ? ? ? ? ? tlow=lowd(0);

    ? ? end;

    //增加

    {這個地方,是一個即時的代碼,也就是當前一根bar上持倉,而當根bar未持倉,那么重新賦值thigh和tlow,后續的進場會根據這兩個新的值進行進場和出場了}

    end;

 

有思路,想編寫各種指標公式,程序化交易模型,選股公式,預警公式的朋友

可聯系技術人員 QQ: 511411198  點擊這里給我發消息進行 有償 編寫!不貴!點擊查看價格!


【字體: 】【打印文章】【查看評論

相關文章

    沒有相關內容
主站蜘蛛池模板: 欧美性猛交xxx黑人猛交 | 九九色视频在线观看 | 一本久道久久综合 | 97视频在线观看免费 | 亚洲精品乱码国产精品乱码 | 欧美成人鲁丝片在线观看 | 五月婷婷激情综合 | www.黄色免费| 五月天婷婷缴情五月免费观看 | 成人精品视频在线观看 | 日韩一区视频在线 | 一级免费黄色大片 | 欧美日本在线视频 | 五月综合视频 | 91视频啊啊啊 | 欧美一级黄色片在线观看 | 成片免费的禁v影片 | 亚洲日产综合欧美一区二区 | 免费黄色片在线 | 日本午夜精品一本在线观看 | 深夜在线免费 | 日韩理论在线 | 日韩一区二区超清视频 | 日本 欧美 在线 | 成人免费观看网站 | 毛片www| 国产 字幕 制服 中文 在线 | 国产麻豆视频免费观看 | 亚洲欧美日韩综合在线 | 国产成人影院一区二区 | 亚洲自拍图片区 | 天天射天天射天天射 | 欧美日韩精品免费一区二区三区 | 亚洲成人激情小说 | 日本欧美高清全视频 | 日韩激情淫片免费看 | 天天操操操操操操 | 影音先锋第一页 | 久久精品国产屋 | 国产成人在线视频 | 久久精品最新免费国产成人 |