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

Which market data provider ?

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

    Which market data provider ?

    My main broker IB doesn't allow to open the real platform simultaneously on two different PCs. Hence, since I do need 2 computers for my trading, I must configure Ninja to run with two different market data providers. This is normally not a problem, because Ninja allows several connections at a time, but it may happen that one broker uses other symbols than the second one (for istance, FXCM trades CFD instead of futures).
    As I noticed, this is involved with some troubles, so Ninja doesn't add all instruments that it is supposed to find. As a consequence, I'm forced to configure my script to recognize the actual data provider, and to change the symbols accordingly between futures and CFD (as an example: if we are connected to IB, add XX 06-16; otherwise add YYYY).
    Question: how and where may my code understand where its data come from ?

    #2
    Hello fliesen,

    Thank you for your post.

    This is not supported, but you could use the following:
    Code:
    if(Bars.MarketData.Connection.Name == "My Connection Name")
    Print("Connected to My Connection Name");

    Comment


      #3
      I know very well which connection is on (it appears in the control menu too).
      It's my code that must know it, and as far as I understand, the offered expression
      if(Bars.MarketData.Connection.Name == "My Connection Name")
      should give my code this chance.

      So why do you write "This is not supported" ?

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Belfortbucks, Today, 09:29 PM
      0 responses
      6 views
      0 likes
      Last Post Belfortbucks  
      Started by zstheorist, Today, 07:52 PM
      0 responses
      7 views
      0 likes
      Last Post zstheorist  
      Started by pmachiraju, 11-01-2023, 04:46 AM
      8 responses
      151 views
      0 likes
      Last Post rehmans
      by rehmans
       
      Started by mattbsea, Today, 05:44 PM
      0 responses
      6 views
      0 likes
      Last Post mattbsea  
      Started by RideMe, 04-07-2024, 04:54 PM
      6 responses
      33 views
      0 likes
      Last Post RideMe
      by RideMe
       
      Working...
      X