Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

2nd Entry

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

    2nd Entry

    Hello,
    I'm trying to add an additional entry to an existing position, without success. My code is this:
    if (CrossBelow(DM(10).DiPlus, DM(10).DiMinus, 1)
    && ToTime(Time[0]) > ToTime(7, 30, 0)
    && ToTime(Time[0]) < ToTime(14, 15, 0))
    {
    EnterLong(DefaultQuantity, "DMLong");
    DMLong = true;
    DrawDiamond("Runner Long" + CurrentBar, true, 0, High[0] + 1, Color.Blue);
    }
    if (DMLong == true
    && CrossAbove(RSI(10, 3), RSI(10, 3).Avg, 1))
    {
    EnterLong(DefaultQuantity, "RSILong");
    DMLong = false;
    DrawDiamond("Runner Long" + CurrentBar, true, 0, High[0] + 1, Color.DarkBlue);
    }
    This diamond are drawing in the correct places and the DMLong entry fires ok, but the RSI entry will not fire. Any suggestions?

    #2
    Perhaps I need to use the EntriesPerDirection, UniqueEntries. I'll try that.

    Comment


      #3
      That did it. Thanks for the sounding board.

      Comment


        #4
        Ok, so now I added a 3rd Entry idea that stays in the market longer. Once in that trade the other 2 entry conditions will not fire. I would like to take those smaller, intermediary, trades as well. I thought the Unique Entry feature would allow me to take all the trades (all in the same direction), but the 3rd entry is overriding. I changed the EntriesPerDirection = 2 and still nothing. Any suggestions?

        Comment


          #5
          Hello CaptainAmericaXX,

          Does the 3rd entry have a unique signal name? If it's different name than the other two, then you can keep EntriesPerDirection as 1 and EntryHandling as UniqueEntries. It should process the signal.

          To track what your strategy is doing: Add TraceOrders = true; to your Initialize() method. If it ignores your entry due to those two properties, then it will indicate this in the Tools > Output Window.
          Ryan M.NinjaTrader Customer Service

          Comment


            #6
            The 3rd entry does have a unique name. I checked the Trace Orders and at the times the other orders should have fired there is no log. Also the Log on the Control Center shows nothing. Any suggestions?

            Comment


              #7
              I'd look next that the conditions actually triggered true. Add drawing objects for signal confirmation, or a simple Print() statement within the same code block that places orders.
              Ryan M.NinjaTrader Customer Service

              Comment


                #8
                Interesting. The draw objects that called the first 2 trades disappear when I add the 3rd condition. I changed nothing else other than adding the 3rd condition. When I remove it the draw objects return. I'm stumped.

                Comment


                  #9
                  You'll have to simplify and debug to follow what your code is doing. Likely some issue with bool controls and code flow. If you want to share the latest file you're using here can give a look.
                  Ryan M.NinjaTrader Customer Service

                  Comment


                    #10
                    Sorry to waste your time. I looked back over my code and realized I'd added a MarketPostition.Flat requirement to the 1st entry and the 2nd entry was dependent upon the first. So since I was long from the 3rd entry the 1st & 2nd wouldn't fire. Thanks for the help.

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                    0 responses
                    649 views
                    0 likes
                    Last Post Geovanny Suaza  
                    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                    0 responses
                    370 views
                    1 like
                    Last Post Geovanny Suaza  
                    Started by Mindset, 02-09-2026, 11:44 AM
                    0 responses
                    109 views
                    0 likes
                    Last Post Mindset
                    by Mindset
                     
                    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                    0 responses
                    574 views
                    1 like
                    Last Post Geovanny Suaza  
                    Started by RFrosty, 01-28-2026, 06:49 PM
                    0 responses
                    576 views
                    1 like
                    Last Post RFrosty
                    by RFrosty
                     
                    Working...
                    X