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

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

下列程序代碼編譯通不過,可能是其中的買賣語句有問題,請幫忙修改一下在MC上編譯能通過 [MC]

  • MC用戶求助:

    If (HH - LC) >= (HC - LL) Then Begin

    ?

    BuyRange = HH - LC;

    ?

    End Else Begin

    ?

    BuyRange = HC - LL;

    ?

    End;

    ?

    BuyTrig = K1*BuyRange;

    ?

    SellTrig = K2*SellRange;

    ?

    If MarketPosition = 0 Then Begin

    ?

    Buy at Open of next bar + BuyTrig Stop;

    ?

    Sell at Open of next bar - SellTrig Stop;

    ?

    End;

    ?

    If MarketPosition = -1 Then Begin

    ?

    Buy at Open of next bar + Buytrig Stop;

    ?

    End;

    ?

    If MarketPosition = 1 Then Begin

    ?

    Sell at Open of next bar - SellTrig Stop;

    ?

    End;

    ?

    End;

    ?

    ?

  • MC回復討論一:

    Inputs: K1(.5),K2(.5),Mday(1),Nday(1);

    Vars: BuyRange(0), SellRange(0);

    Vars: BuyTrig(0),SellTrig(0);

    Vars: HH(0),LL(0),HC(0),LC(0);

    If CurrentBar > 1 Then Begin

    HH = Highest(High,Mday);

    HC = Highest(Close,Mday);

    LL = Lowest(Low,Mday);

    LC = Lowest(Close,Mday);

    If (HH - LC) >= (HC - LL) Then Begin

    SellRange = HH - LC;

    End Else Begin

    SellRange = HC - LL;

    End;

    HH = Highest(High,Nday);

    HC = Highest(Close,Nday);

    LL = Lowest(Low,Nday);

    LC = Lowest(Close,Nday);

    If (HH - LC) >= (HC - LL) Then Begin

    BuyRange = HH - LC;

    End Else Begin

    BuyRange = HC - LL;

    End;

    BuyTrig = K1*BuyRange;

    SellTrig = K2*SellRange;

    If MarketPosition = 0 Then Begin

    Buy at Open of next bar + BuyTrig Stop;

    Sell at Open of next bar - SellTrig Stop;

    End;

    If MarketPosition = -1 Then Begin

    Buy at Open of next bar + Buytrig Stop;

    End;

    If MarketPosition = 1 Then Begin

    Sell at Open of next bar - SellTrig Stop;

    End;

    End;

    <!-- [if !supportLineBreakNewLine]-->
    <!--[endif]-->

    ?

  • MC回復討論二:

    Inputs: K1(.5),K2(.5),Mday(1),Nday(1);

    Vars: BuyRange(0), SellRange(0);

    Vars: BuyTrig(0),SellTrig(0);

    Vars: HH(0),LL(0),HC(0),LC(0);

    If CurrentBar > 1 Then Begin

    HH = Highest(High,Mday);

    HC = Highest(Close,Mday);

    LL = Lowest(Low,Mday);

    LC = Lowest(Close,Mday);

    If (HH - LC) >= (HC - LL) Then Begin

    SellRange = HH - LC;

    End Else Begin

    SellRange = HC - LL;

    End;

    HH = Highest(High,Nday);

    HC = Highest(Close,Nday);

    LL = Lowest(Low,Nday);

    LC = Lowest(Close,Nday);

    If (HH - LC) >= (HC - LL) Then Begin

    BuyRange = HH - LC;

    End Else Begin

    BuyRange = HC - LL;

    End;

    BuyTrig = K1*BuyRange;

    SellTrig = K2*SellRange;

    If MarketPosition = 0 Then Begin

    //Buy at Open of next bar + BuyTrig Stop;

    buy next bar at open next bar +buytrig stop;

    //Sell at Open of next bar - SellTrig Stop;

    sell next bar at open next bar -selltrig stop;

    End;

    If MarketPosition = -1 Then Begin

    //Buy at Open of next bar + Buytrig Stop;

    buy next bar at open next bar+buytrig stop;

    End;

    If MarketPosition = 1 Then Begin

    //Sell at Open of next bar - SellTrig Stop;

    sell next bar at open next bar -selltrig stop;

    End;

    End;

    特別說明:您的編譯的問題在于使用委托單的語句不當導致的,您可以看一下帖子https://forum.multicharts.cn/forum/cat/0/thread/33

    另外,open next bar-selltrig,這個數值實際是下一根bar的開盤價與selltrig的差。

 

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

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


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

相關文章

    沒有相關內容
主站蜘蛛池模板: 亚洲第一福利网站 | 精品一区二区三区中文 | 久久精品视 | 久久青草免费免费91线频观看 | 亚洲国产一区二区三区综合片 | 欧洲一区麻豆文化传媒 | 青春久久 | japan高清视频乱xxxxx | 亚洲一区二区三区在线免费观看 | 日韩av.com| 中文字幕精品视频在线观 | 久草手机在线观看视频 | 国产精品久久久久久久人热 | 日韩亚洲人成在线综合日本 | 日韩精品在线一区 | 动漫精品成人免费网站 | 婷婷影院在线观看 | 色图综合 | 成人午夜影院 | 日韩成人免费观看 | 成人短视频在线 | 成人三级视频在线观看 | 黄色片视频网 | 日韩在线一 | 丝袜美女网 | 妞干网免费在线 | 免费看欧美一级特黄α大片 | 欧美一区二区三区不卡视频 | 美女中文字幕 | 成年网站在线 | 欧美日本视频在线观看 | 亚洲视频天天射 | 欧美性极品videosbest | 欧美成人一区二区三区不卡视频 | 亚洲欧美国产18 | 中文日韩亚洲欧美制服 | 亚洲欧美国产精品久久久 | 亚洲三级在线视频 | 性猛交xxxxx按摩 | 国产精品激情丝袜美女 | 国产偷国产偷亚洲高清在线 |