Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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




    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.
        Chelsea B.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by arvidvanstaey, Today, 02:19 PM
        4 responses
        10 views
        0 likes
        Last Post arvidvanstaey  
        Started by samish18, 04-17-2024, 08:57 AM
        16 responses
        56 views
        0 likes
        Last Post samish18  
        Started by jordanq2, Today, 03:10 PM
        2 responses
        8 views
        0 likes
        Last Post jordanq2  
        Started by traderqz, Today, 12:06 AM
        10 responses
        18 views
        0 likes
        Last Post traderqz  
        Started by algospoke, 04-17-2024, 06:40 PM
        5 responses
        47 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Working...
        X