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 Geovanny Suaza, 02-11-2026, 06:32 PM
              0 responses
              648 views
              0 likes
              Last Post Geovanny Suaza  
              Started by Geovanny Suaza, 02-11-2026, 05:51 PM
              0 responses
              369 views
              1 like
              Last Post Geovanny Suaza  
              Started by Mindset, 02-09-2026, 11:44 AM
              0 responses
              108 views
              0 likes
              Last Post Mindset
              by Mindset
               
              Started by Geovanny Suaza, 02-02-2026, 12:30 PM
              0 responses
              572 views
              1 like
              Last Post Geovanny Suaza  
              Started by RFrosty, 01-28-2026, 06:49 PM
              0 responses
              574 views
              1 like
              Last Post RFrosty
              by RFrosty
               
              Working...
              X