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 fx.practic, 10-15-2013, 12:53 AM
      5 responses
      5,404 views
      0 likes
      Last Post Bidder
      by Bidder
       
      Started by Shai Samuel, 07-02-2022, 02:46 PM
      4 responses
      95 views
      0 likes
      Last Post Bidder
      by Bidder
       
      Started by DJ888, Yesterday, 10:57 PM
      0 responses
      8 views
      0 likes
      Last Post DJ888
      by DJ888
       
      Started by MacDad, 02-25-2024, 11:48 PM
      7 responses
      159 views
      0 likes
      Last Post loganjarosz123  
      Started by Belfortbucks, Yesterday, 09:29 PM
      0 responses
      8 views
      0 likes
      Last Post Belfortbucks  
      Working...
      X