大伊人青草狠狠久久-大伊香蕉精品视频在线-大伊香蕉精品一区视频在线-大伊香蕉在线精品不卡视频-大伊香蕉在线精品视频75-大伊香蕉在线精品视频人碰人

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


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

相關文章

    沒有相關內容
主站蜘蛛池模板: 综合久久99久久99播放 | zzijzzij亚洲日本护士 | 久草免费在线观看视频 | 四虎看片 | 在线观看视频色 | 97视频资源站 | 91网址在线播放 | 午夜影视在线 | 欧美特级特黄a大片免费 | 久久免费在线观看 | 国产极品嫩模大尺度福利视频 | 亚洲欧美大片 | 天天操夜夜 | 国产免费自拍视频 | 91亚洲精品久久91综合 | 亚洲欧美久久一区二区 | 奇米在线777在线视频 | 免费夜色污私人影院网站 | 久草精品视频在线观看 | 国产成人禁片免费观看 | 一级毛片日韩a欧美 | 欧美日韩久久毛片 | 中文精品久久久久中文 | 亚洲视频一区在线 | 成人在线观看不卡 | 天天综合亚洲国产色 | 国产精品四虎 | 五月色婷婷综合激情免费视频 | 我想看一级黄色毛片 | 中文字幕在线免费视频 | 综合久久久久综合体桃花网 | 2020国产成人免费视频 | 免费xxxx美国18 | 久草美女 | 久久精品视频5 | 狠狠骑 | 国内精品久久久久久久久 | 一级毛片子| 久久久国产99久久国产一 | 九九资源网 | 久久天天躁综合夜夜黑人鲁色 |