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 RubenCazorla, 08-30-2022, 06:36 AM
        3 responses
        77 views
        0 likes
        Last Post PaulMohn  
        Started by f.saeidi, Yesterday, 12:14 PM
        9 responses
        23 views
        0 likes
        Last Post f.saeidi  
        Started by Tim-c, Today, 03:54 AM
        0 responses
        3 views
        0 likes
        Last Post Tim-c
        by Tim-c
         
        Started by FrancisMorro, Today, 03:24 AM
        0 responses
        5 views
        0 likes
        Last Post FrancisMorro  
        Started by Segwin, 05-07-2018, 02:15 PM
        10 responses
        1,772 views
        0 likes
        Last Post Leafcutter  
        Working...
        X