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

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


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

相關文章

    沒有相關內容
主站蜘蛛池模板: 欧美性xxx免费看片 欧美性导航 | 在线精品国内外视频 | 亚洲免费区| 亚洲综合第一欧美日韩中文 | 天天射天天搞 | 久爱免费观看在线精品 | 在线成h人视频网站免费观看 | a一级免费视频 | 亚洲人成网站色7799在线观看 | 欧美成人免费全部观看天天性色 | 成年人免费视频观看 | 国产h在线播放 | 岛国在线播放v片免费 | 青青草成人网 | 日韩一区二区不卡中文字幕 | 伊人手机视频 | 欧美日韩专区 | 色综合天天综久久久噜噜噜久久〔 | 亚洲福利| 五月婷婷伊人网 | 黄色a三级三级三级免费看 黄色a三级免费看 | 性猛交毛片| 婷婷狠狠 | 天天躁夜夜躁狠狠躁躁 | 国产亚洲精品国产第一 | 午夜免费视频观看 | 日批在线播放 | 国产九九视频在线观看 | 97碰视频人人做人人爱欧美 | 午夜影院日韩 | 曰本三级香港三级三级人 | 韩国理论免费 | 中国一级片免费 | 成人免费黄色片 | 最新日韩伦理片免费 | 日韩福利在线观看 | 国产综合色在线视频 | 国产女人的一级毛片视频 | 欧美精品束缚一区二区三区 | 性生大片一级毛片免费观看 | 曰曰啪天天拍视频在线 |