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 Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      670 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      379 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      111 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      575 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      582 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X