Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

MultiInstrument MultiStrategy - Need multiple open positions

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

    MultiInstrument MultiStrategy - Need multiple open positions

    I am running 2 unique strategies on 3 different instruments which means that I will have a total of 6 live strategies. Each strategy is only trading one instrument. Right now I am just connected to paper trading on IB. When I enable all 6 strategies, only the first strategy places a trade (I have the global setting for Ninja Script set to trade immediately - e.g. don't wait until strategy is flat). Using Strategy Analyzer I can see that more than just one strategy should have entered a trade (they are all green in the control center).

    So I am thinking that this has to do with one of two things maybe... I check for Position.MarketPosition == MarketPosition.Flat in NinjaScript before entering a new position and so maybe NT just looks for "Flat" generally and not limited to the position created by each individual strategy. I also have "Entries Per Direction" set to 1 for each strategy in the strategy properties window. Again, maybe NT views this as a setting for all strategies combined and not just the individual strategy where the setting is implemented and so is only allowing one overall trade at a time. Also, I have it coded so that all positions are assigned unique names. The reason I check for Flat and only EntriesPerDirection = 1 is that I want each live strategy to only trade one positon at a time. But that means that each live strategy could have a position open and therefore a total of 6 positions could be open at any time 6 live strategies X 1 position each = 6.

    I probably just have a basic misunderstanding of something here. I read through the sections on Position and EntriesPerDirection and they didn't provide me the insight that I needed to figure this out.

    Thanks in advance for the help.
    Last edited by joesandyego; 10-20-2011, 02:35 PM.

    #2
    Originally posted by joesandyego View Post
    When I enable all 6 strategies, only the first strategy places a trade (I have the global setting for Ninja Script set to trade immediately - e.g. don't wait until strategy is flat)
    To clarify this setting "Immediately submit live working historical orders". This does not mean that all strategies place orders right away. It means that should you start the strategy while it's in a historically position, it does not have to wait until flat before submitting orders. So the first exit signal that comes up would be submitted.

    While you're getting a feel for real time strategy operation, it will be best to simplify the setup. I would only work with one strategy at a time until you are confident of its expected behavior on the account. I would review this page on syncing which details the outcomes expected based on the interaction of these settings and the historical strategy position at the time you enable it:


    In order to track what your strategy is doing for order submission, you can enable TraceOrders = true; in the strategies Initialize() method, and view output related to orders using Tools > Output Window. Help for using TraceOrders and other debugging tools is available here:
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      Thanks Ryan. I appreciate the advice to start off simple and will do that. But can you also please let me know if Position.MarketPosition and EntriesPerDirection are supposed to be specific for an instance of the strategy that calls them or if they are supposed to reflect all strategies that are enabled/live? Also, if there is anything to do with running multiple instances of the same strategy (with same name also) in parallel that causes confusion then please let me know.

      Comment


        #4
        Joe, those would be always specific to the individual strategy instance, as strategies generally would not cross communicate. Please work with a simple setup first and then ensure the overall strategy position matches the account position, this would mean all instances running are in sync as needed.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        639 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        366 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        107 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        569 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        572 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X