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 lightsun47, Today, 03:51 PM
        0 responses
        5 views
        0 likes
        Last Post lightsun47  
        Started by 00nevest, Today, 02:27 PM
        1 response
        10 views
        0 likes
        Last Post 00nevest  
        Started by futtrader, 04-21-2024, 01:50 AM
        4 responses
        46 views
        0 likes
        Last Post futtrader  
        Started by Option Whisperer, Today, 09:55 AM
        1 response
        14 views
        0 likes
        Last Post bltdavid  
        Started by port119, Today, 02:43 PM
        0 responses
        10 views
        0 likes
        Last Post port119
        by port119
         
        Working...
        X