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

Avoid adding to a position

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

    Avoid adding to a position

    Hello, Good Day to all,

    I'm trying to develop a strategy that has more than one option for opening a position ("OR" condition). I couldn't find this option in the Strategy Wizard, so the solution I cam across was to insert instructions on a separate "set" tab.

    However I now find that NT is adding to a position when the secondary condition also becomes true. I want to restrict it to opening more than one position in the same instrument.

    How do I fix this problem? Any way of adding a "OR" condition or to restrict more than one position on the same instrument?

    Thank you.

    Yours
    Eduardo

    #2
    Hello Eduardo,

    Thank you for your note.

    You would not be able to use OR in the Strategy Wizard and would only be available by unlocking the code and manually programming this.

    You can use the User Defined variables to set when the first conditions it true to set a value and then test that value in the next set so that it does not continue one and vice versa.
    Cal H.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by somethingcomplex, Today, 10:36 PM
    0 responses
    3 views
    0 likes
    Last Post somethingcomplex  
    Started by sofortune, Yesterday, 10:28 AM
    5 responses
    22 views
    0 likes
    Last Post sofortune  
    Started by ETFVoyageur, Today, 10:13 PM
    0 responses
    4 views
    0 likes
    Last Post ETFVoyageur  
    Started by guyonabuffalo, Today, 10:01 PM
    0 responses
    2 views
    0 likes
    Last Post guyonabuffalo  
    Started by cre8able, 05-09-2024, 09:15 PM
    3 responses
    21 views
    0 likes
    Last Post cre8able  
    Working...
    X