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 sightcareclickhere, Today, 01:55 PM
      0 responses
      1 view
      0 likes
      Last Post sightcareclickhere  
      Started by Mindset, 05-06-2023, 09:03 PM
      9 responses
      258 views
      0 likes
      Last Post ender_wiggum  
      Started by Mizzouman1, Today, 07:35 AM
      4 responses
      18 views
      0 likes
      Last Post Mizzouman1  
      Started by philmg, Today, 01:17 PM
      1 response
      8 views
      0 likes
      Last Post NinjaTrader_ChristopherJ  
      Started by cre8able, Today, 01:01 PM
      1 response
      9 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Working...
      X