Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Turtle soup, plus one

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Turtle soup, plus one

    Can somebody help me convert this metastock formula in a strategy of ninjatrader

    {TURTLE SOUP ( +1 ) Buy Entry}
    BuyCondition := L = LLV(L,20) AND BarsSince( Ref(L = LLV(L,20), -1) ) >3 AND (C <= ValueWhen(2, L = LLV(L,20), L) ) ;
    Ref(If( BuyCondition , ValueWhen(2, L = LLV(L,20), L) ,0), -1)


    thank you

    #2
    For the LLV function you guys can use LowestBar(): http://www.ninjatrader-support.com/H...LowestBar.html.

    As a last resort you can also try contacting one of the NinjaScript Consultants here: http://www.ninjatrader.com/webnew/pa...injaScript.htm
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by angio View Post
      Can somebody help me convert this metastock formula in a strategy of ninjatrader

      {TURTLE SOUP ( +1 ) Buy Entry}
      BuyCondition := L = LLV(L,20) AND BarsSince( Ref(L = LLV(L,20), -1) ) >3 AND (C <= ValueWhen(2, L = LLV(L,20), L) ) ;
      Ref(If( BuyCondition , ValueWhen(2, L = LLV(L,20), L) ,0), -1)


      thank you

      do you solve it?

      Comment


        #4
        Originally posted by zukkaweb View Post
        do you solve it?
        ................no

        Comment


          #5
          I can provide u only with the original turtle strategy which is the following:
          #region Variables
          // Wizard generated variables
          private int enter = 20; // Default setting for Enter
          private int exit = 10; // Default setting for Exit
          // User defined variables (add any user defined variables below)
          #endregion
          and in protected override void OnBarUpdate()
          {
          // Condition set 1
          if (Close[0] > DonchianChannel(enter).Upper[1])
          {
          EnterLong(DefaultQuantity, "EnterLong");
          }

          // Condition set 1.5
          if (Close[0] < DonchianChannel(enter).Lower[1])
          {
          EnterShort(DefaultQuantity, "EnterShort");
          }

          // Condition set 2
          if (Close[0] < DonchianChannel(exit).Lower[1])
          {
          ExitLong("", "EnterLong");
          }
          // Condition set 2.5
          if (Close[0] > DonchianChannel(exit).Upper[1])
          {
          ExitShort("", "EnterShort");
          }
          // Condition set Long Stop Loss
          if (Close[0] < (Position.AvgPrice - ATR(20)[0])
          && Position.MarketPosition == MarketPosition.Long)
          {
          ExitLong("", "EnterLong");
          }
          // Condition set Long Stop Loss
          if (Close[0] > (Position.AvgPrice - ATR(20)[0])
          && Position.MarketPosition == MarketPosition.Short)
          {
          ExitShort("", "EnterShort");
          }
          }
          Maybe u can recode it to the turtle soup,

          Cheers

          Comment


            #6
            thank you i start now

            Comment


              #7
              Hi,

              I am really interested in ninjascript for Turtle Soup Plus One...Did you ever manage to get this code modified ?

              I would be very interested in it ...if you have it.

              thanks in advance

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by yertle, Yesterday, 08:38 AM
              7 responses
              28 views
              0 likes
              Last Post yertle
              by yertle
               
              Started by bmartz, 03-12-2024, 06:12 AM
              2 responses
              20 views
              0 likes
              Last Post bmartz
              by bmartz
               
              Started by funk10101, Today, 12:02 AM
              0 responses
              4 views
              0 likes
              Last Post funk10101  
              Started by gravdigaz6, Yesterday, 11:40 PM
              1 response
              8 views
              0 likes
              Last Post NinjaTrader_Manfred  
              Started by MarianApalaghiei, Yesterday, 10:49 PM
              3 responses
              10 views
              0 likes
              Last Post NinjaTrader_Manfred  
              Working...
              X