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

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

這個需求怎么實現(xiàn)? [MC]

  • MC用戶求助:

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

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

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

    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這個條件判斷當天是否為節(jié)假日前的第一天; 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回復討論一:

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

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

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

    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這個條件判斷當天是否為節(jié)假日前的第一天; 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

 

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

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


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

相關文章

    沒有相關內容
主站蜘蛛池模板: 精品久久伦理中文字幕 | 国产精品成 | 二级片免费看 | 7799国产精品久久久久99 | 在线观看 日韩 | 毛片网子 | 亚洲成在人 | 免费四影虎ww4hu10 | 国产精品久久久久久久久免费hd | 亚洲毛片网站 | 性欧美video另类hd亚洲人 | 在线视频欧美日韩 | 亚洲欧美日韩国产精品网 | 久久精品久久精品国产大片 | 99热2| 欧美精品影视 | 日本一级特级毛片视频 | 国产免费一区二区三区香蕉精 | 国产伦精品一区二区 | 夜夜夜夜夜夜夜猛噜噜噜噜噜噜 | 欧美亚洲高清日韩成人 | 国内精品视频成人一区二区 | 精品国产综合区久久久久99 | 久久久久久网 | 国产精品网址你懂的 | 站长推荐国产精品视频 | 九九热最新视频 | a免费在线观看视频 | 国产精品视频公开费视频 | 国产精品视频在线免费观看 | 成人a免费α片在线视频网站 | 国产午夜精品不卡视频 | 成人免费国产欧美日韩你懂的 | 免费看a网站 | 国产成人精品久久一区二区小说 | 2020国产成人精品视频人 | 国产福利免费视频 | 国产免费播放一区二区三区 | 久久免费观看爱情动作片 | 国内精品免费 | 亚洲欧美中文日韩二区一区 |