Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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 xepher101, Yesterday, 12:19 PM
        2 responses
        28 views
        0 likes
        Last Post xepher101  
        Started by thumper57, Today, 04:30 PM
        0 responses
        4 views
        0 likes
        Last Post thumper57  
        Started by OllieFeraher, 05-09-2024, 11:14 AM
        5 responses
        16 views
        0 likes
        Last Post MisterTee  
        Started by jackiegils, Yesterday, 11:05 PM
        1 response
        11 views
        0 likes
        Last Post marcus2300  
        Started by Skifree, Today, 02:50 PM
        0 responses
        8 views
        0 likes
        Last Post Skifree
        by Skifree
         
        Working...
        X