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

請教有沒有符合原版海龜?shù)腗C代碼?官網(wǎng)下載的有點問題 [MC]

  • MC用戶求助:

    input: InitialBalance(1000000);?

    vars: N(0),StopLoss(1),DV(0),BB(0),AccountBalance(0),DollarRisk(0),LTT(0),LastTrade(0);?

    {/// Turtle 20-Day Breakout Replica //////////////////////////////////////}

    if marketposition = 0 then begin

    BB = 0;

    N = AvgTrueRange(20);?

    DV = N*BigPointValue;

    {AccountBalance = InitialBalance;}

    AccountBalance = InitialBalance + netprofit;

    DollarRisk = AccountBalance * .01;

    LTT = IntPortion(DollarRisk/DV);

    StopLoss = 2 * DV * LTT;

    //Entry Contracts

    buy LTT shares next bar highest(h,20) or higher;

    buy LTT shares next bar highest(h,20) + (0.5*N) or higher;

    buy LTT shares next bar highest(h,20) + (1.0*N) or higher;

    buy LTT shares next bar highest(h,20) + (1.5*N) or higher;

    SellShort LTT shares next bar lowest(l,20) or lower;

    SellShort LTT shares next bar lowest(l,20) - (0.5*N) or lower;

    SellShort LTT shares next bar lowest(l,20) - (1.0*N) or lower;

    SellShort LTT shares next bar lowest(l,20) - (1.5*N) or lower;

    end;

    ?

    ?

    ?

    {// LONG 20 }

    if marketposition = 1 then begin

    BB = BB + 1;

    if currentcontracts = LTT then begin

    buy LTT shares next bar highest(h,20)[BB] + (0.5*N) or higher;

    buy LTT shares next bar highest(h,20)[BB] + (1.0*N) or higher;

    buy LTT shares next bar highest(h,20)[BB]+ (1.5*N) or higher;

    end;

    if currentcontracts = LTT * 2 then begin

    buy LTT shares next bar highest(h,20)[BB] + (1.0*N) or higher;

    buy LTT shares next bar highest(h,20)[BB] + (1.5*N) or higher;

    end;

    if currentcontracts = LTT * 3 then

    buy LTT shares next bar highest(h,20)[BB] + (1.5*N) or higher;

    end;

    ?

    Sell ("out-S") next bar lowest(l,10) or lower;

    ?

    if marketposition = -1 then begin

    BB = BB + 1;

    if currentcontracts = LTT then begin

    SellShort LTT shares next bar lowest(l,20)[BB] - (0.5*N) or lower;

    SellShort LTT shares next bar lowest(l,20)[BB] - (1.0*N) or lower;

    SellShort LTT shares next bar lowest(l,20)[BB] - (1.5*N) or lower;

    end;

    if currentcontracts = LTT * 2 then begin

    SellShort LTT shares next bar lowest(l,20)[BB] - (1.0*N) or lower;

    SellShort LTT shares next bar lowest(l,20)[BB] - (1.5*N) or lower;

    end;

    if currentcontracts = LTT * 3 then?

    SellShort LTT shares next bar lowest(l,20)[BB] - (1.5*N) or lower;?

    end;

    ?

    buytocover ("out-B") next bar highest(h,10) or higher;

    {// STOPS}

    if currentcontracts = (2 * LTT) then StopLoss = DV * 3.5 * LTT;

    if currentcontracts = (3 * LTT) then StopLoss = DV * 4.5 * LTT;

    if currentcontracts = (4 * LTT) then StopLoss = DV * 5.0 * LTT;

    setstoploss (StopLoss);

    ?

    ?

  • MC回復(fù)討論一:

    input: InitialBalance(1000000);?

    vars: N(0),StopLoss(1),DV(0),BB(0),AccountBalance(0),DollarRisk(0),LTT(0),LastTrade(0);?

    {/// Turtle 20-Day Breakout Replica //////////////////////////////////////}

    if marketposition = 0 then begin

    BB = 0;

    N = AvgTrueRange(20);?

    DV = N*BigPointValue;

    {AccountBalance = InitialBalance;}

    AccountBalance = InitialBalance + netprofit;

    DollarRisk = AccountBalance * .01;

    LTT = IntPortion(DollarRisk/DV);

    StopLoss = 2 * DV * LTT;

    //Entry Contracts

    buy LTT shares next bar highest(h,20) or higher;

    buy LTT shares next bar highest(h,20) + (0.5*N) or higher;

    buy LTT shares next bar highest(h,20) + (1.0*N) or higher;

    buy LTT shares next bar highest(h,20) + (1.5*N) or higher;

    SellShort LTT shares next bar lowest(l,20) or lower;

    SellShort LTT shares next bar lowest(l,20) - (0.5*N) or lower;

    SellShort LTT shares next bar lowest(l,20) - (1.0*N) or lower;

    SellShort LTT shares next bar lowest(l,20) - (1.5*N) or lower;

    end;

    ?

    ?

    ?

    {// LONG 20 }

    if marketposition = 1 then begin

    BB = BB + 1;

    if currentcontracts = LTT then begin

    buy LTT shares next bar highest(h,20)[BB] + (0.5*N) or higher;

    buy LTT shares next bar highest(h,20)[BB] + (1.0*N) or higher;

    buy LTT shares next bar highest(h,20)[BB]+ (1.5*N) or higher;

    end;

    if currentcontracts = LTT * 2 then begin

    buy LTT shares next bar highest(h,20)[BB] + (1.0*N) or higher;

    buy LTT shares next bar highest(h,20)[BB] + (1.5*N) or higher;

    end;

    if currentcontracts = LTT * 3 then

    buy LTT shares next bar highest(h,20)[BB] + (1.5*N) or higher;

    end;

    ?

    Sell ("out-S") next bar lowest(l,10) or lower;

    ?

    if marketposition = -1 then begin

    BB = BB + 1;

    if currentcontracts = LTT then begin

    SellShort LTT shares next bar lowest(l,20)[BB] - (0.5*N) or lower;

    SellShort LTT shares next bar lowest(l,20)[BB] - (1.0*N) or lower;

    SellShort LTT shares next bar lowest(l,20)[BB] - (1.5*N) or lower;

    end;

    if currentcontracts = LTT * 2 then begin

    SellShort LTT shares next bar lowest(l,20)[BB] - (1.0*N) or lower;

    SellShort LTT shares next bar lowest(l,20)[BB] - (1.5*N) or lower;

    end;

    if currentcontracts = LTT * 3 then?

    SellShort LTT shares next bar lowest(l,20)[BB] - (1.5*N) or lower;?

    end;

    ?

    buytocover ("out-B") next bar highest(h,10) or higher;

    {// STOPS}

    if currentcontracts = (2 * LTT) then StopLoss = DV * 3.5 * LTT;

    if currentcontracts = (3 * LTT) then StopLoss = DV * 4.5 * LTT;

    if currentcontracts = (4 * LTT) then StopLoss = DV * 5.0 * LTT;

    setstoploss (StopLoss);

    ?

 

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

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


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

相關(guān)文章

    沒有相關(guān)內(nèi)容
主站蜘蛛池模板: 久久久久久91| 亚洲精品欧美精品日韩精品| 18女人腿打开无遮掩| 性导航app精品视频| 亚洲av无码第一区二区三区| 狼人久蕉在线播放| 国产一区二区三区不卡在线观看 | 蜜桃成熟时2005| 国产裸体舞一区二区三区| 一边摸一边叫床一边爽| 最好看的中文字幕视频2018| 亚洲精品欧美精品日韩精品| 精品熟人妻一区二区三区四区不卡| 国产美女久久久| 一本一本久久a久久精品综合| 欧美怡红院高清在线| 动漫卡通精品3d一区二区| 黑人精品videos亚洲人| 国产美女牲交视频| youjizz国产| 无码人妻一区二区三区免费看| 亚洲欧美另类久久久精品能播放的| 青青青国产依人在在线观看高| 天天操天天射天天操| 中文字幕无码精品亚洲资源网 | 欧美va亚洲va在线观看蝴蝶网| 可以看的黄色软件| 国产精品久久女同磨豆腐 | 亚洲明星合成图综合区在线| 精品一区精品二区| 国产a级特黄的片子视频| 黄色黄色一级片| 国产精品亚洲成在人线| 99热这里只有精品66| 小小在线观看视频www软件| 丰满少妇被猛男猛烈进入久久 | 国产丰满麻豆videossexhd| 菠萝蜜亏亏带痛声的视频| 图片区日韩欧美亚洲| tube美国xxxx69| 御书宅自由小说阅读无弹窗|