Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

EnterLong() twice does not give me 2 long contracts

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

    EnterLong() twice does not give me 2 long contracts

    Hi there,

    Good day. Re the subject - I tried executing EnterLong() a few times but still ends up with one contract. Specifying a quantity does not help.(?)

    The purpose is to scale out my positions; say, adding one contract at a time. How can this be done with EnterLong(), EnterShort()?

    Thank you for your valuable input.


    Regards,
    Steven

    #2
    Hello Steven,

    What EntryHandling are you using? What is EntriesPerDirection set to?
    https://ninjatrader.com/support/help...ryhandling.htm
    https://ninjatrader.com/support/help...rdirection.htm

    Are the entries using unique signal names?

    This is discussed in the 'Automate Your Trading with NinjaTrader's Strategy Builder' training video.
    https://forum.ninjatrader.com/forum/...pts#post786040

    Below is a link to an example of scaling out.
    https://ninjatrader.com/support/foru...80#post1077380

    Have you enabled TraceOrders to see if the order is being ignored?
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Hi Chelsea,

      EntriesPerDirection = 5;
      EntryHandling = EntryHandling.AllEntries;

      Typo. I intended to say 'scale in' - that's the problem I encountered. I could not add positions. Do I have to use signal name in order to add positions wz EnterLong() or EnterShort()? I did not use it in my previous tests.

      Regards,
      Steven

      Comment


        #4
        Hello Steven,

        When using EntriesPerDirection I would expect up to 5 entry orders to be submitted.
        This wasn't changed, correct? (If it was changed in State.SetDefaults, you will need to remove the strategy instance and add a new instance to pull the new defaults)

        May I have the output from the NinjaScript Output window with the TraceOrders information to see if the orders are being ignored?
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          hi Chelsea,

          Ok. I'll send to you the info when I get to test the new version of my strategy again.

          Regards,
          Steven

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by CarlTrading, 03-31-2026, 09:41 PM
          1 response
          47 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Started by CarlTrading, 04-01-2026, 02:41 AM
          0 responses
          23 views
          0 likes
          Last Post CarlTrading  
          Started by CaptainJack, 03-31-2026, 11:44 PM
          0 responses
          33 views
          1 like
          Last Post CaptainJack  
          Started by CarlTrading, 03-30-2026, 11:51 AM
          0 responses
          51 views
          0 likes
          Last Post CarlTrading  
          Started by CarlTrading, 03-30-2026, 11:48 AM
          0 responses
          42 views
          0 likes
          Last Post CarlTrading  
          Working...
          X