Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Enterlong quanity 0

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

    Enterlong quanity 0

    I have several entries for Entering long in my strategy using
    EnterLong(int quantity,string signalName)

    I want to turn off some long entries

    When the quantity is 0 , 1 contract is still entered.. How do I turn this off so it doesn't place an order?

    #2
    gg80108,

    I'm not sure why you want to "turn" off entries. If you don't want to place an entry, don't call the method. If you want to sometimes place it, sometimes not use an if-statement overarching the entry call.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_Josh View Post
      gg80108,

      I'm not sure why you want to "turn" off entries. If you don't want to place an entry, don't call the method. If you want to sometimes place it, sometimes not use an if-statement overarching the entry call.
      Because I have different stop exits for different entries,, my first T1 has fixed stop, where my next entries T2 T3 have different initial stops and trailing stops..
      This seemed to be an good way to set this up to use the optimizer to determine a ballpark what stops should be..
      Is there an easier way (better) to code this so I can optimize???

      Comment


        #4
        You will have to use if-statements.
        Josh P.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        670 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        379 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        111 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        575 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        582 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X