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 martin70, 03-24-2023, 04:58 AM
        14 responses
        105 views
        0 likes
        Last Post martin70  
        Started by TraderBCL, Today, 04:38 AM
        0 responses
        2 views
        0 likes
        Last Post TraderBCL  
        Started by Radano, 06-10-2021, 01:40 AM
        19 responses
        606 views
        0 likes
        Last Post Radano
        by Radano
         
        Started by KenneGaray, Today, 03:48 AM
        0 responses
        4 views
        0 likes
        Last Post KenneGaray  
        Started by thanajo, 05-04-2021, 02:11 AM
        4 responses
        470 views
        0 likes
        Last Post tradingnasdaqprueba  
        Working...
        X