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

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
    Chris L.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by athexinehowley, Today, 02:39 AM
    0 responses
    3 views
    0 likes
    Last Post athexinehowley  
    Started by dtaylor, Today, 02:24 AM
    0 responses
    1 view
    0 likes
    Last Post dtaylor
    by dtaylor
     
    Started by RosaRichardow, Today, 12:21 AM
    1 response
    3 views
    0 likes
    Last Post marcus2300  
    Started by ETFVoyageur, Today, 12:45 AM
    1 response
    6 views
    0 likes
    Last Post ETFVoyageur  
    Started by TradeSaber, Yesterday, 10:33 PM
    1 response
    11 views
    0 likes
    Last Post TradeSaber  
    Working...
    X