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