Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Connection Source

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

    Connection Source

    I have an indicator that writes out the Prior Day OHLC plus today's "cash open" price (future's contracts)-- To get the price data for cash open I am running this on a 1-minute chart and capturing the open of the 7:31 bar (Mountain time)--

    I have 2 connections--Zen-fire and Kinetick -- assume I only have one connected at any one time--

    As I run this indicator on a chart (and it writes to a file)--is the historical data coming first from the database (stored values) if there are any--or is it rebuilding these values each time I run it using the then current connection's datafeed?

    If the latter, is there anyway for me to retrieve which connection is 'connected' -- from a built-in method/property? This way I can also write the source of the data to the file.

    If there's not a built-in function-is there a way to do this at all using other (non-NinjaTrader) functions in C#?
    Jim-Boulder
    NinjaTrader Ecosystem Vendor - Elephant Tracks

    #2
    Hello Jim-Boulder,

    Thank you for your post.

    Historical Data will reload from the data provider under these three conditions:
    1. The End date parameter of the Data Series window contains the current day
    2. The End date parameter of the Data Series window contains the last day of data available in your data repository
    3. The data repository contains no data within 3 days of the first day loaded in the chart

    You can find additional information at the following link on when historical is loaded from the data feed provider: http://www.ninjatrader.com/support/h...rical_data.htm

    The following line is unsupported code but will tell you in the Output Window (Tools > Output Window) what connection is connected:
    Code:
    Print(Bars.MarketData.Connection.Name.ToString());
    Please let me know if I may be of further assistance.

    Comment


      #3
      You da man! Thanks.
      Jim-Boulder
      NinjaTrader Ecosystem Vendor - Elephant Tracks

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Hwop38, 05-04-2026, 07:02 PM
      0 responses
      161 views
      0 likes
      Last Post Hwop38
      by Hwop38
       
      Started by CaptainJack, 04-24-2026, 11:07 PM
      0 responses
      310 views
      0 likes
      Last Post CaptainJack  
      Started by Mindset, 04-21-2026, 06:46 AM
      0 responses
      245 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by M4ndoo, 04-20-2026, 05:21 PM
      0 responses
      349 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by M4ndoo, 04-19-2026, 05:54 PM
      0 responses
      179 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Working...
      X