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 Segwin, 05-07-2018, 02:15 PM
        14 responses
        1,789 views
        0 likes
        Last Post aligator  
        Started by Jimmyk, 01-26-2018, 05:19 AM
        6 responses
        837 views
        0 likes
        Last Post emuns
        by emuns
         
        Started by jxs_xrj, 01-12-2020, 09:49 AM
        6 responses
        3,293 views
        1 like
        Last Post jgualdronc  
        Started by Touch-Ups, Today, 10:36 AM
        0 responses
        13 views
        0 likes
        Last Post Touch-Ups  
        Started by geddyisodin, 04-25-2024, 05:20 AM
        11 responses
        63 views
        0 likes
        Last Post halgo_boulder  
        Working...
        X