• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

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 Ilpropio, Yesterday, 09:45 PM
        1 response
        4 views
        0 likes
        Last Post NinjaTrader_EricB  
        Started by sgordet, Yesterday, 10:31 PM
        1 response
        2 views
        0 likes
        Last Post NinjaTrader_EricB  
        Started by Revan, Yesterday, 05:44 PM
        1 response
        14 views
        0 likes
        Last Post NinjaTrader_Marco  
        Started by superg3, Yesterday, 07:57 PM
        0 responses
        4 views
        0 likes
        Last Post superg3
        by superg3
         
        Started by Longhornmark, Yesterday, 07:06 AM
        5 responses
        37 views
        0 likes
        Last Post nkhoi
        by nkhoi
         
        Working...
        X