Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

read database directly from indicator

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

    read database directly from indicator

    I would like to be able to detect if instrument is missing historical data from the NT database by using an indicator to access the database directly rather than loading the data into the chart and then process it.
    So, is there a way from a chart indicator to access an instruments stored historical data directly without first loading it into the chart? If so could you please provide an example of the command or syntax.

    I don't want to use the database GUI which is a humongous nested list of dates to try to see if data is missing because it's not efficient >> eyes + mouse clicking = pain!

    If you know of another way to determine if historical data is missing I would like to hear about it otherwise I think I can build an indicator to do it now but it would only use the data that's loaded into the chart and I'm trying to make the indicator more robust than that.

    Thanks

    #2
    Hi dtl-saw, thanks for posting. I made this example that performs a BarsRequest while an indicator is initializing. Study this and it should be what you need:

    I have a plot I have added to my indicator AddPlot(new Stroke(Brushes.AliceBlue, 0), PlotStyle.Dot, "Buys"); When State == State.RealTime in the OnStateChange() method I am trying to access historical values of the Buys Series but I am getting argumentOutOfRange exceptions. The Count is > 0. Why is this


    For the "LookupPolicy" set it to "Repository" to access only the local database, if that is what you need.

    Best regards,
    -ChrisL

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    81 views
    1 like
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    42 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    64 views
    2 likes
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    68 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    55 views
    0 likes
    Last Post CarlTrading  
    Working...
    X