Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

MarketData works for ES only

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

    MarketData works for ES only

    Hello.

    I have a C# test program that show last price (client.MarketData(Instrument, 0), bid price (client.MarketData(Instrument, 1) and ask price (client.MarketData(Instrument, 2), every 60 seconds.

    Tests work fine only with the instrument ES 06-17,but I dont know why don't work with YM 06-17.

    With YM 06-17, the price values are wrong and they are not updated.

    Please, I like to know who had any problem like that, and how was fixed.

    Thanks.
    Attached Files

    #2
    Hello excepticons, and thank you for your question. There are many reasons this could be happening. Would it be possible to send a stripped down copy of your code? This will help us give the best help possible.
    Jessica P.NinjaTrader Customer Service

    Comment


      #3
      We understand your time is valuable. Since NinjaScript pulls from the same data source your Basic Entry corner of the Orders tab of the control center does, the most common reason for your NinjaScript not matching this information would be your code processing on bar closing. I would like to recommend refactoring your NinjaScript code as a multi-timeframe strategy



      with a one-tick secondary series, and reading values from this series. Please let us know if there are any other ways we can help.
      Jessica P.NinjaTrader Customer Service

      Comment


        #4
        Hi, Jessica.
        I have concluded that version 7 has some connectivity issues. I dont know what issues are, but with just install version 8, problems are gone.
        Remark:I'm not using NinjaScript. I have developed a program in C# with netframework 4.6 that has a reference to NinjaTrader.Client.dll.
        This is the source:

        ...
        using NinjaTrader.Data;
        ...
        ...
        iRetornos = client.SubscribeMarketData(cInstrumento);
        dLastPrice = client.MarketData(cInstrumento, 0);
        dBidPrice = client.MarketData(cInstrumento, 1);
        dAskPrice = client.MarketData(cInstrumento, 2);
        ...
        ...
        client.UnsubscribeMarketData(cInstrumento);
        ...

        This C# program works perfect with NT 8!

        Thanks for your cooperation.

        Gustavo

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by elirion, Today, 01:36 AM
        0 responses
        3 views
        0 likes
        Last Post elirion
        by elirion
         
        Started by gentlebenthebear, Today, 01:30 AM
        0 responses
        2 views
        0 likes
        Last Post gentlebenthebear  
        Started by samish18, Yesterday, 08:31 AM
        2 responses
        9 views
        0 likes
        Last Post elirion
        by elirion
         
        Started by Mestor, 03-10-2023, 01:50 AM
        16 responses
        389 views
        0 likes
        Last Post z.franck  
        Started by rtwave, 04-12-2024, 09:30 AM
        4 responses
        33 views
        0 likes
        Last Post rtwave
        by rtwave
         
        Working...
        X