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

Limiting simultaneous orders

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

    Limiting simultaneous orders

    I have 10 instruments enabled on the strategy. I want to limit it to only trade one contract on up to 3 of the 10 strategy's at any given time. Are there settings in ninajtrader for this?

    #2
    Originally posted by brucelevy View Post
    I have 10 instruments enabled on the strategy. I want to limit it to only trade one contract on up to 3 of the 10 strategy's at any given time. Are there settings in ninajtrader for this?
    Setting EntriesPerDirection = 1 will limit to 1 contract.

    I'm not aware of anything in NT7 that will allow you to limit to 3 out of 10 running strategies.
    You'll probably have to program this, with a static variable to count how many entries you perform, and if there are 3 - do not enter long/short.



    I have searched about static variables in C#, but I am still not getting what its use is. Also, if I try to declare the variable inside the method it will not give me the permission to do this. Why...

    Comment


      #3
      Hello brucelevy,

      Thank you for your post.

      Seldge is correct, the UI allows you to limit the strategy instance but nothing over all running strategies. So as sledge suggested you would need you own tracking for this.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Rapine Heihei, Today, 08:19 PM
      1 response
      3 views
      0 likes
      Last Post NinjaTrader_Manfred  
      Started by Rapine Heihei, Today, 08:25 PM
      0 responses
      3 views
      0 likes
      Last Post Rapine Heihei  
      Started by f.saeidi, Today, 08:01 PM
      1 response
      4 views
      0 likes
      Last Post NinjaTrader_Manfred  
      Started by Rapine Heihei, Today, 07:51 PM
      0 responses
      6 views
      0 likes
      Last Post Rapine Heihei  
      Started by frslvr, 04-11-2024, 07:26 AM
      5 responses
      96 views
      1 like
      Last Post caryc123  
      Working...
      X