Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Missing methods/properties from NT7 to NT8

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

    Missing methods/properties from NT7 to NT8

    Hello

    I'm trying to transfer my code from NT7 to NT8. There were some methods/properties I couldn't find a replacement for despite looking on the article at the bottom:

    1. Bars.MarketData
    2. Provider.Replay


    https://ninjatrader.com/support/help...ng_changes.htm

    Thanks

    #2
    Hello kiss987,

    These items are not documented for NinjaTrader 7.

    If you are trying to get the playback time of the playback connection in NT8, you can find this with:
    Code:
    Cbi.Connection.PlaybackConnection.Now
    If you are trying to find the connection name:
    Code:
    protected override void OnConnectionStatusUpdate(ConnectionStatusEventArgs connectionStatusUpdate)
    {
      if (connectionStatusUpdate.Connection.Options.Name == "Playback Connection")
      {
      Print("connected to Playback");
      }
    }
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Thanki you for your reply.

      I'm looking for the following:
      1. Bars.MarketData.Connection.Now
      2. Order.Error

      Comment


        #4
        Hello kiss987,

        I may not be understanding what you are looking for with Bars.MarketData.Connection.Now.

        This code is for NinjaTrader 7 and provides the time of the Market Replay.

        Was the Cbi.Connection.PlaybackConnection.Now I have suggested insufficient to print the playback time?


        With the Order.Error, are you submitting orders to an account with CreateOrder()?
        If so, attach an event handler method to the <Account>.OrderUpdate event. The returned OrderEventArgs object will have a .Error property.
        Code:
        private void Account_OrderUpdate(object sender, OrderEventArgs e)
        {
        	Print(e.Error.ToString());
        }
        Below is a public link to the help guide.
        https://ninjatrader.com/support/help...rderupdate.htm
        Chelsea B.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by StockJock, Today, 08:52 PM
        0 responses
        3 views
        0 likes
        Last Post StockJock  
        Started by rmicalet, Today, 07:10 PM
        0 responses
        5 views
        0 likes
        Last Post rmicalet  
        Started by cincai, Today, 07:02 PM
        0 responses
        2 views
        0 likes
        Last Post cincai
        by cincai
         
        Started by AlexsOptions, Today, 05:42 PM
        2 responses
        18 views
        0 likes
        Last Post AlexsOptions  
        Started by philli4093, Today, 05:20 PM
        2 responses
        8 views
        0 likes
        Last Post philli4093  
        Working...
        X