乡下人产国偷v产偷v自拍,国产午夜片在线观看,婷婷成人亚洲综合国产麻豆,久久综合给合久久狠狠狠9

  • <output id="e9wm2"></output>
    <s id="e9wm2"><nobr id="e9wm2"><ins id="e9wm2"></ins></nobr></s>

    • 分享

      著名的海龜交易法則-easylanguge編寫

       禁忌石 2010-08-03

      著名的海龜交易法則-easylanguge編寫

      (2010-07-23 10:43:52)
       

      海龜交易法則細(xì)則

      一、市場(chǎng)----買賣什么

      •中國金融交易所-滬深300期指

      •上海交易所-銅、橡膠、螺紋鋼

      •大連交易所-豆油、塑料

       

      二、市場(chǎng)規(guī)模----買賣多少

      •N表示某個(gè)特定市場(chǎng)根本的波動(dòng)率

      •N=(19×PDN+TR)/20

       

      TR=max(H-L,H-PDC,PDC-L)

      H-當(dāng)日最高價(jià)

      L-當(dāng)日最低價(jià)

      PDC-前個(gè)交易日的收盤價(jià)

      •單位=帳戶的1%/市場(chǎng)價(jià)值量波動(dòng)率或單位=帳戶的1%/(N×每點(diǎn)價(jià)值量)

       

      三、進(jìn)場(chǎng)----何時(shí)買

      •系統(tǒng)1

      突破20日高點(diǎn)買進(jìn)

      跌破20日低點(diǎn)賣出

      •系統(tǒng)2

       

      突破55日高點(diǎn)買進(jìn)

      跌破55日低點(diǎn)賣出

      資金配置:系統(tǒng)1 (50%),系統(tǒng)2(50%)

       

      四、停損----何時(shí)退出虧損的部位

      •停損1-2N停損法

      買進(jìn)部位以最后成交價(jià)-2n為停損點(diǎn)

      賣出部位以最后成交價(jià)+2n為停損點(diǎn)

      •停損2-1/2N停損法 

      買進(jìn)部位以最后成交價(jià)-1/2n為停損點(diǎn)

      賣出部位以最后成交價(jià)+1/2n為停損點(diǎn)

       

      五、出場(chǎng)----何時(shí)退出獲利的部位

      •系統(tǒng)一出場(chǎng)對(duì)于多頭部位為10日最低價(jià),對(duì)于空頭部位為10日最高價(jià)。如果價(jià)格波動(dòng)與部位背離至10日突破,部位中的所有單位都會(huì)退出。系統(tǒng)二出場(chǎng)對(duì)于多頭部位為20日最低價(jià),對(duì)于空頭部位為20日最高價(jià)。如果價(jià)格波動(dòng)與部位背離至20日突破,部位中的所有單位都會(huì)退出。

       

      /// Turtle 20-Day Breakout

      Replica //////////////////////////////////////

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

      Tracker(0),LastTrade(0),HBP(0),LBP(0); input: InitialBalance(1000000),Length(20);

      if marketposition = 0 then begin
      BB = 0;
      N = xAverage( TrueRange, Length );
      DV = N * BigPointValue;
      AccountBalance = InitialBalance;
      DollarRisk = AccountBalance * .01;
      LTT = IntPortion(DollarRisk/DV);
      StopLoss = 2 * DV * LTT;

      if LastTrade = -1 then begin
      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;

      if LastTrade = 1 then begin
      buy LTT shares next bar highest(h,55) or higher;
      buy LTT shares next bar highest(h,55) + (0.5*N) or higher;
      buy LTT shares next bar highest(h,55) + (1.0*N) or higher;
      buy LTT shares next bar highest(h,55) + (1.5*N) or higher;
      sellshort LTT shares next bar lowest(l,55) or lower;
      sellshort LTT shares next bar lowest(l,55) - (0.5*N) or lower;
      sellshort LTT shares next bar lowest(l,55) - (1.0*N) or lower;
      sellshort LTT shares next bar lowest(l,55) - (1.5*N) or lower;
      end;

      end;

      // PREVIOUS TRADE TRACKER
      if HBP = 0 and h > highest(h,19)[1] then begin
      Tracker = 1; HBP = h; LBP = 0;
      end;

      if LBP = 0 and l < lowest(l,19)[1] then begin
      Tracker = -1; LBP = l; HBP = 0;
      end;

      if Tracker = 1 then begin
      if l < HBP - (2*N) then LastTrade = -1;
      if h > HBP + (4*N) then LastTrade = 1;
      end;

      if Tracker = -1 then begin
      if h > LBP + (2*N) then LastTrade = -1;
      if l < LBP - (4*N) then LastTrade = 1;
      end;

      // LONG 20
      if LastTrade = -1 and marketposition = 1 then begin
      BB = BB + 1;
      if currentshares = 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 currentshares = 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 currentshares = LTT * 3 then
      buy LTT shares next bar highest(h,20)[BB] + (1.5*N) or higher;
      end;

      // LONG 55
      if LastTrade = 1 and marketposition = 1 then begin
      BB = BB + 1;
      if currentshares = LTT then begin
      buy LTT shares next bar highest(h,55)[BB] + (0.5*N) or higher;
      buy LTT shares next bar highest(h,55)[BB] + (1.0*N) or higher;
      buy LTT shares next bar highest(h,55)[BB]+ (1.5*N) or higher;
      end;
      if currentshares = LTT * 2 then begin
      buy LTT shares next bar highest(h,55)[BB] + (1.0*N) or higher;
      buy LTT shares next bar highest(h,55)[BB] + (1.5*N) or higher;
      end;
      if currentshares = LTT * 3 then
      buy LTT shares next bar highest(h,55)[BB] + (1.5*N) or higher;
      end;
      sell ("out-S") next bar lowest(l,10) or lower;

      // SHORT 20
      if LastTrade = -1 and marketposition = -1 then begin
      BB = BB + 1;
      if currentshares = 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 currentshares = 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 currentshares = LTT * 3 then
      sellshort LTT shares next bar lowest(l,20)[BB] - (1.5*N) or lower;
      end;

      // SHORT 55
      if LastTrade = 1 and marketposition = -1 then begin
      BB = BB + 1;
      if currentshares = LTT then begin
      sellshort LTT shares next bar lowest(l,55)[BB] - (0.5*N) or lower;
      sellshort LTT shares next bar lowest(l,55)[BB] - (1.0*N) or lower;
      sellshort LTT shares next bar lowest(l,55)[BB] - (1.5*N) or lower;
      end;
      if currentshares = LTT * 2 then begin
      sellshort LTT shares next bar lowest(l,55)[BB] - (1.0*N) or lower;
      sellshort LTT shares next bar lowest(l,55)[BB] - (1.5*N) or lower;
      end;
      if currentshares = LTT * 3 then
      sellshort LTT shares next bar lowest(l,55)[BB] - (1.5*N) or lower;
      end;
      buytocover ("out-B") next bar highest(h,10) or higher;

      // STOPS
      if currentshares = (2 * LTT) then StopLoss = DV * 3.5 * LTT;
      if currentshares = (3 * LTT) then StopLoss = DV * 4.5 * LTT;
      if currentshares = (4 * LTT) then StopLoss = DV * 5.0 * LTT;
      setstoploss (StopLoss);

      // COMMENTARY
      commentary ("LTT: ",LTT,Newline);
      commentary ("CurrentShares: ",CurrentShares,Newline);
      commentary ("StopLoss: ",StopLoss,Newline);
      commentary ("AccountBalance:",AccountBalance,NewLine);
      commentary ("LastTrade: ",LastTrade,NewLine);

        本站是提供個(gè)人知識(shí)管理的網(wǎng)絡(luò)存儲(chǔ)空間,所有內(nèi)容均由用戶發(fā)布,不代表本站觀點(diǎn)。請(qǐng)注意甄別內(nèi)容中的聯(lián)系方式、誘導(dǎo)購買等信息,謹(jǐn)防詐騙。如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請(qǐng)點(diǎn)擊一鍵舉報(bào)。
        轉(zhuǎn)藏 分享 獻(xiàn)花(0

        0條評(píng)論

        發(fā)表

        請(qǐng)遵守用戶 評(píng)論公約

        類似文章 更多