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

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 LiamTwine, Today, 08:10 AM
      0 responses
      2 views
      0 likes
      Last Post LiamTwine  
      Started by Balage0922, Today, 07:38 AM
      0 responses
      5 views
      0 likes
      Last Post Balage0922  
      Started by JoMoon2024, Today, 06:56 AM
      0 responses
      6 views
      0 likes
      Last Post JoMoon2024  
      Started by Haiasi, 04-25-2024, 06:53 PM
      2 responses
      19 views
      0 likes
      Last Post Massinisa  
      Started by Creamers, Today, 05:32 AM
      0 responses
      6 views
      0 likes
      Last Post Creamers  
      Working...
      X