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 charlesugo_1, 05-26-2026, 05:03 PM
        0 responses
        67 views
        0 likes
        Last Post charlesugo_1  
        Started by DannyP96, 05-18-2026, 02:38 PM
        1 response
        150 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 05-11-2026, 05:56 AM
        0 responses
        162 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 05-10-2026, 08:12 PM
        0 responses
        99 views
        0 likes
        Last Post CarlTrading  
        Started by Hwop38, 05-04-2026, 07:02 PM
        0 responses
        287 views
        0 likes
        Last Post Hwop38
        by Hwop38
         
        Working...
        X