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

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

期貨期權交流求教代碼問題 [MC]

  • 咨詢內容:
    ? ?? ?你好,下面是我編寫的股指期貨代碼,現在有幾個問題想請教一下。
    ? ?? ?1、以下的代碼有沒有地方可以簡化?可以減少計算時間。
    ? ?? ?2、現在運行中,setstoploss止損后,就不能自動開倉了,如果想止損后依然按條件自動開倉,應該怎么寫代碼?
    ? ???非常感謝!




    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技術部: 還想請問我的收盤平倉的代碼是否正確?

 

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

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


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

相關文章

    沒有相關內容
主站蜘蛛池模板: 99国产视频 | 国产高清在线91福利 | 国产一区二区福利久久 | 日本一区二区三区欧美在线观看 | 免费精品国产福利片 | 波多野结衣一区在线 | 日韩a毛片| 成人国产精品一级毛片视频 | 中文字幕在线观看一区 | 亚洲经典在线中文字幕 | 欧美一级特黄aaa大片 | 国产成人亚洲综合a∨婷婷 国产成人亚洲综合欧美一部 | 天天射天天舔 | 香蕉精品视频在线观看入口 | 成人影院在线观看 | 最新黄色免费网站 | 亚洲国产精品久久久久 | 欧美国产亚洲精品a第一页 欧美国产亚洲精品高清不卡 | 国产不卡视频 | 国产成人青青热久免费精品 | 黄色毛片免费看 | 99久久综合精品国产 | 亚洲欧美日韩中字综合 | 黄频网站在线观看视频 | 4hu四虎永久免在线视看 | 久久精品一区二区三区不卡 | 中文字幕日本在线观看 | 九九热在线视频观看 | 毛片免费观看 | 免费福利视频在线观看 | 亚洲国产一级a毛片 | 日韩欧美一级毛片在线 | 天天碰夜夜 | 精品特级一级毛片免费观看 | 玖玖免费| 亚洲图片综合网 | 久久91精品国产91久久户 | a中文字幕1区 | 久久久欧美综合久久久久 | 欧美日本一二三区 | 国产一级视频播放 |