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

Condition...If market position=2 longs

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

    Condition...If market position=2 longs

    I have a strategy where I enter market with 2 contracts- I have done this by naming both individually as my first condition... that happens when price closes above a certain MA.
    Now I want to set it up whereby if price retraces and close back below that ma I can exit both contracts.
    If someone could help me with the wizard choices that would be great.
    My intention then is to take this knowledge and apply it to the next part of the strategy which is IF price closes below a swing low, 1 contract will be taken out.
    The remaining contract will stay in the market till it eventually closes below the same MA.

    Once I have that I will replicate it all for the shorts!
    Can anyone help me?
    Thanks
    raycam

    #2
    raycam, I believe you refer to you entering with 2 entry orders (individual named) - then you could exit both contracts in for example Set2 as the CrossBelow occurs, just don't enter a specific signal name to exit from, just issue an ExitLong with a empty 'FromSignalName' filed and it would exit both contracts.
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Thanks- That will do it nicely.
      raycam

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by judysamnt7, 03-13-2023, 09:11 AM
      4 responses
      59 views
      0 likes
      Last Post DynamicTest  
      Started by ScottWalsh, Today, 06:52 PM
      4 responses
      36 views
      0 likes
      Last Post ScottWalsh  
      Started by olisav57, Today, 07:39 PM
      0 responses
      7 views
      0 likes
      Last Post olisav57  
      Started by trilliantrader, Today, 03:01 PM
      2 responses
      22 views
      0 likes
      Last Post helpwanted  
      Started by cre8able, Today, 07:24 PM
      0 responses
      10 views
      0 likes
      Last Post cre8able  
      Working...
      X