您現在的位置:程序化交易>> 期貨公式>> (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  點擊這里給我發消息進行 有償 編寫!不貴!點擊查看價格!


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

相關文章

    沒有相關內容
主站蜘蛛池模板: 中文字幕在线亚洲精品| 亚洲综合国产成人丁香五月激情| 5g影院天天爽爽| 成年女人免费v片| 亚洲国产一区二区a毛片| 精品人妻系列无码人妻漫画| 国产成人欧美一区二区三区vr| 99精品视频在线观看| 无需付费大片免费在线观看| 亚洲噜噜噜噜噜影院在线播放| 看看镜子里我是怎么c哭你的| 国产亚洲精品美女久久久久久下载| 67pao强力打造67194在线午夜亚洲 | 中文字幕日本最新乱码视频| 欧美不卡在线视频| 人妻少妇精品无码专区二区| 色婷婷激情综合| 国产日产精品_国产精品毛片| 99re66热这里只有精品首页| 成人免费在线播放| 久久国产色av| 欧美人与zozoxxxx视频| 人妖欧美一区二区三区四区| 美女的尿口免费| 国产成 人 综合 亚洲专 | 久久亚洲精品成人无码网站| 漂亮人妻被黑人久久精品| 又硬又粗又大一区二区三区视频 | 亚洲精品国产综合久久一线| 精品熟女碰碰人人a久久| 国产国产精品人在线视| 亚洲影视自拍揄拍愉拍| 国内精品国语自产拍在线观看91| √天堂资源最新版中文种子| 我和室友香蕉第二部分 | 久久综合九色综合97免费下载| 欧美激欧美啪啪片sm| 人妻在线日韩免费视频| 精品国产亚洲第一区二区三区| 国产不卡一卡2卡三卡4卡5卡在线| 91香蕉视频污污|