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

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

期貨期權(quán)交流求教代碼問(wèn)題 [MC]

  • 咨詢內(nèi)容:
    ? ?? ?你好,下面是我編寫的股指期貨代碼,現(xiàn)在有幾個(gè)問(wèn)題想請(qǐng)教一下。
    ? ?? ?1、以下的代碼有沒(méi)有地方可以簡(jiǎn)化?可以減少計(jì)算時(shí)間。
    ? ?? ?2、現(xiàn)在運(yùn)行中,setstoploss止損后,就不能自動(dòng)開(kāi)倉(cāng)了,如果想止損后依然按條件自動(dòng)開(kāi)倉(cāng),應(yīng)該怎么寫代碼?
    ? ???非常感謝!




    inputs:p01(9999),p02(9999),p03(9999),p04(9999);
    variables:co1(0),c02(0),c03(0),c04(0),d01(0),d02(0),d03(0),d04(0);
    begin
    co1=p01-0.2;
    c02=p02-0.2;
    c03=p03-0.2;
    c04=p04-0.2;
    d01=p01+0.2;
    d02=p02+0.2;
    d03=p03+0.2;
    d04=p04+0.2;
    if close cross above co1 and marketposition=0 then sellshort 1 contract next bar at market;
    if close cross above c02 and marketposition=0 then sellshort 1 contract next bar at market;
    if close cross above c03 and marketposition=0 then sellshort 1 contract next bar at market;
    if close cross above c04 and marketposition=0 then sellshort 1 contract next bar at market;
    if close cross under d01 and marketposition=0 then buy 1 contract next bar at market;
    if close cross under d02 and marketposition=0 then buy 1 contract next bar at market;
    if close cross under d03 and marketposition=0 then buy 1 contract next bar at market;
    if close cross under d04 and marketposition=0 then buy 1 contract next bar at market;
    if close cross above co1 and marketposition=1 then sellshort 1 contracts next bar at market;
    if close cross above c02 and marketposition=1 then sellshort 1 contracts next bar at market;
    if close cross above c03 and marketposition=1 then sellshort 1 contracts next bar at market;
    if close cross above c04 and marketposition=1 then sellshort 1 contracts next bar at market;
    if close cross above d01 and marketposition=-1 then buy 1 contract next bar at market;
    if close cross above d02 and marketposition=-1 then buy 1 contract next bar at market;
    if close cross above d03 and marketposition=-1 then buy 1 contract next bar at market;
    if close cross above d04 and marketposition=-1 then buy 1 contract next bar at market;
    if close cross under co1 and marketposition=1 then sellshort 1 contract next bar at market;
    if close cross under c02 and marketposition=1 then sellshort 1 contract next bar at market;
    if close cross under c03 and marketposition=1 then sellshort 1 contract next bar at market;
    if close cross under c04 and marketposition=1 then sellshort 1 contract next bar at market;
    if close cross under d01 and marketposition=-1 then buy 1 contracts next bar at market;
    if close cross under d02 and marketposition=-1 then buy 1 contracts next bar at market;
    if close cross under d03 and marketposition=-1 then buy 1 contracts next bar at market;
    if close cross under d04 and marketposition=-1 then buy 1 contracts next bar at market;
    if close cross above d01 and marketposition=-1 then buy 1 contracts next bar at market;
    if close cross above d02 and marketposition=-1 then buy 1 contracts next bar at market;
    if close cross above d03 and marketposition=-1 then buy 1 contracts next bar at market;
    if close cross above d04 and marketposition=-1 then buy 1 contracts next bar at market;
    setstoploss(600);
    if time>=1457 then
    sell next bar at market;
    buytocover next bar at market;
    end

    ?

  • MC技術(shù)部: 還想請(qǐng)問(wèn)我的收盤平倉(cāng)的代碼是否正確?

 

有思路,想編寫各種指標(biāo)公式,程序化交易模型,選股公式,預(yù)警公式的朋友

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


【字體: 】【打印文章】【查看評(píng)論

相關(guān)文章

    沒(méi)有相關(guān)內(nèi)容
主站蜘蛛池模板: 久久国产免费福利资源网站 | 久久mimi色 | 欧美成人在线视频 | 91亚洲免费视频 | 久久九九综合 | 波多野结衣久久精品免费播放 | 在线播放免费一级毛片欧美 | 在线 | 一区二区三区四区 | 精品天海翼一区二区 | 亚洲 国产精品 日韩 | 国产另类图片 | 成人嫩草研究院永久网址 | 亚洲激情视频网 | 五月天丁香婷婷综合久久 | 综合色区| 久久99青青久久99久久 | 一级黄色录像免费观看 | 91精品国产91久久久久福利 | 特级毛片aaaa级毛片免费 | 亚洲成a人v大片在线观看 | 中文字幕亚洲综合久久男男 | www.黄色在线观看 | 国产欧美另类久久久精品免费 | 日韩欧美一级毛片视频免费 | 成人毛片免费观看视频 | 免费国产高清精品一区在线 | 亚洲一区在线日韩在线深爱 | 日本一区不卡视频 | 美国一级毛片片免费 | 日韩精品一区二区三区国语自制 | 丁香婷婷成人 | 七次郎在线成人精品 | 亚洲a视频在线 | 天天干天天操天天 | 国产午夜在线观看 | 欧美亚洲国产精品久久第一页 | 国产91在线|亚洲 | 久久在线视频 | 久久久国产一区二区三区 | 欧美一级一极性活片免费观看 | 日韩男女视频 |