Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

primary vs secondary connection

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

    primary vs secondary connection

    seems ninja uses the 'last' data connection to assign to a strategy upon its enable.

    for example:
    1. connect zen then kinetick
    2. enable 4 strategies
    3. disconnect kinetick, then reconnect kinetick
    4. enable 4 more strategies
    5. check Strategy tab and first 4 strats show connected via zen...the last 4 via kinetick

    problem: GetUnrealizedProfitLoss does not work on last 4 charts since not connected to broker feed/zen

    do not know if this is bug or not

    occurs to me if you are setting your broker feed as primary that all strats enabled whenver should connect via 'primary' and not 'last connected'

    or ...should add feature to be able to change connection status on strat by strat basis?...maybe under the Enable button in Strategy dialog?

    why step 4? ...because I needed to create Sim108 which requires new connection...otherwise likely would never have stumbled on the problem

    #2
    Hello ATI user,

    NinjaTrader should apply the strategy to the Primary connection under the Connection column of the Strategies tab unless a specific account is specified for example if you apply it to your Zen-Fire account even thought your Zen-Fire connection is not the primary connection it will apply the Connection to Zen-Fire.

    Could you post a snippet of your code so that I may take a look at what is being called, and also what account is the strategy being applied to?


    Happy to be of further assistance.
    JCNinjaTrader Customer Service

    Comment


      #3
      SIM101, SIM102, SIM103, SIM104, SIM105, SIM106, SIM107
      then disconnect/connect kinetick
      SIM108, SIM109, SIM110

      last 3 were assigned Kinectic connection

      all 1 min NQ12-12 chart running same code which calls several market internals from Kinetick

      Comment


        #4
        Hello ATI user,

        I am not able to recreate this.

        1. Connected to Zen-Fire first (Primary Connection)
        2. Connected to Kinetick second (Secondary Connection)
        3. Create new NQ 12-12 (1 Min) chart
        4. Apply SampleMACrossOver Strategy to Sim101 account.
        5. Repeat steps 3-4, but ammend the Sim account number, until Sim107.
        6. Disconnected from Kinetick
        7. Connected to Kinetick.
        8. Repeat steps 3-4, but ammend the Sim account number, until Sim110.

        All Strategies were applied to the Zen-Fire data connection.

        With that said, using the Sim account it should not matter since they are all localized to your PC. Could you post a snippet of your code and tell me what is happening on the ones that are connected to Zen-Fire that is no on the Kinetick data feed?

        Alternatively, you can send a toy* NinjaScript code replicating the behavior so that I may look into this to support [at] ninjatrader [dot] com with ATTN: JC and reference to this thread.

        Happy to be of further assistance.

        *Toy - basically a stripped down version of code that isn't necessarily the whole logic; making it easier to identify lines of code.
        JCNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        656 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        371 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        109 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        574 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        579 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X