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

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

這個需求怎么實現? [MC]

  • MC用戶求助:

    ”節假日及周末前“,這個節假日及周末的日期需要您手動輸入,然后在代碼中實時的與當前的日期時間進行比較判斷,下面分別提供螺紋和滬金的例子,僅供參考:

    //rb
    input: endtime(2300);
    var: tt(""),t1(""), t_date(0);

    tt=txt_read("F:\test25.txt");??
    {這里使用了從外部讀取信息,因為這樣可以在程序運行過程中,對外部讀取的文件進行人工更改,而不需要停止自動交易然后再重新輸入參數或者更改代碼了;輸入節假日的第一天的日期即可}

    t1=midstr(tt,1,7);//見附件內容,只是一個簡單的模板,更復雜的數據需要清洗
    t_date=strtonum(t1);??//將字符轉化為數值

    condition1=juliantodate(datetojulian(t_date)-1)=date and time>=minutestotime(timetominutes(endtime)-5);
    {juliantodate(datetojulian(t_date)-1)=date這個條件判斷當天是否為節假日前的第一天; time>=minutestotime(timetominutes(endtime)-5)這個條件判斷當根bar是否處在收盤前的5分鐘內}

    if condition1 and marketposition<>0 then begin
    ? ? ? ? sell next bar at market;
    ? ? ? ? buytocover next bar at market;
    end;

    //au
    input: endtime(230);
    var: tt(""),t1(""), t_date(0);

    tt=txt_read("F:\test25.txt");

    t1=midstr(tt,1,7);
    t_date=strtonum(t1);

    condition1=juliantodate(datetojulian(t_date))=date and time>=minutestotime(timetominutes(endtime)-5) and time<900;
    if condition1 and marketposition<>0 then begin
    ? ? ? ? sell next bar at market;
    ? ? ? ? buytocover next bar at market;
    end;

    代碼見鏈接:

    http://dl.icetech.com.cn/download/forums/test25.txt

    ?

  • MC回復討論一:

    ”節假日及周末前“,這個節假日及周末的日期需要您手動輸入,然后在代碼中實時的與當前的日期時間進行比較判斷,下面分別提供螺紋和滬金的例子,僅供參考:

    //rb
    input: endtime(2300);
    var: tt(""),t1(""), t_date(0);

    tt=txt_read("F:\test25.txt");??
    {這里使用了從外部讀取信息,因為這樣可以在程序運行過程中,對外部讀取的文件進行人工更改,而不需要停止自動交易然后再重新輸入參數或者更改代碼了;輸入節假日的第一天的日期即可}

    t1=midstr(tt,1,7);//見附件內容,只是一個簡單的模板,更復雜的數據需要清洗
    t_date=strtonum(t1);??//將字符轉化為數值

    condition1=juliantodate(datetojulian(t_date)-1)=date and time>=minutestotime(timetominutes(endtime)-5);
    {juliantodate(datetojulian(t_date)-1)=date這個條件判斷當天是否為節假日前的第一天; time>=minutestotime(timetominutes(endtime)-5)這個條件判斷當根bar是否處在收盤前的5分鐘內}

    if condition1 and marketposition<>0 then begin
    ? ? ? ? sell next bar at market;
    ? ? ? ? buytocover next bar at market;
    end;

    //au
    input: endtime(230);
    var: tt(""),t1(""), t_date(0);

    tt=txt_read("F:\test25.txt");

    t1=midstr(tt,1,7);
    t_date=strtonum(t1);

    condition1=juliantodate(datetojulian(t_date))=date and time>=minutestotime(timetominutes(endtime)-5) and time<900;
    if condition1 and marketposition<>0 then begin
    ? ? ? ? sell next bar at market;
    ? ? ? ? buytocover next bar at market;
    end;

    代碼見鏈接:

    http://dl.icetech.com.cn/download/forums/test25.txt

 

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

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


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

相關文章

    沒有相關內容
主站蜘蛛池模板: 免费一级毛片在线视频观看 | 亚洲欧美强伦一区二区另类 | 久草手机在线 | 国产亚洲一区二区麻豆 | 日本一区二区三区免费观看 | 日本黄色免费一级片 | 亚洲国产日韩在线人高清 磁力 | 欧美日韩一级视频 | 特级黄色网 | 亚洲国产欧美91 | 免费99视频有精品视频高清 | 国产天堂网 | 久久天天躁夜夜躁狠狠躁2015 | 在线免费激情视频 | 看一级毛片免费观看视频 | 高清中文字幕视频在线播 | 欧美xxxxx000 | 免费一级黄色毛片 | 免费中文字幕 | 久久高清精品 | 亚洲视频精品在线 | 你懂的在线视频播放 | 情侣黄网站免费看 | 韩国免费一级成人毛片 | 日批视频在线观看 | 五月婷婷丁香在线视频 | 国产精品成人免费观看 | 国产精品1区2区3区 国产精品1区 2区 3区 | 99亚洲视频 | 国产香港日本三级在线观看 | 日韩在线观看一区二区三区 | 国产综合精品日本亚洲777 | 欧美成人午夜在线全部免费 | 操操干干 | 午夜影皖普通区 | 在线黄色免费 | 亚洲 欧美 视频 | 欧美色成人| www三级免费 | 欧美一级高清免费播放 | 午夜羞羞视频在线观看 |