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

Detect Missing bars on State Historical

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

    Detect Missing bars on State Historical


    Hello,
    I want to develop an Indicator which applies the following formula:
    Code:
    Value[0] = Math.Long(Input[0] / Input[1]);

    seems easy right? the thing is... I need to capture missing bars to assign a value to Input on that specific timestamp

    Can a timer help me detect a bar that has not occurred on State.Historical and State.Realtime?
    Is there any other/better way to detect a missing bar?
    Is there a way to capture this missing bars by developing a new BarType?

    Thank you in advance,
    Lismar

    PD: I wrote this topic under General Development thread because this implementation may be done either on Indicators or on Strategies.

    #2
    Hello lismartin,

    Can you provide more detail about what you mean by missing bars? Is the data physically missing?

    For a script with OnBarUpdate it would have no means to know if data was missing, the bars being processed would call OnBarUpdate only for the bars which exist.

    For a bars type you would process the individual data points, to know some portion of data was missing would require checking the times from each data point and then determining if there was some gap of time or some criteria which would equate to missing data between the times. Other scripts could also check the bar timestamps but if there is no bar built for the given missing data then the script just does not process that bar/time.

    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by tkaboris, Today, 08:01 AM
    1 response
    7 views
    0 likes
    Last Post NinjaTrader_Gaby  
    Started by Lumbeezl, 01-11-2022, 06:50 PM
    31 responses
    817 views
    1 like
    Last Post NinjaTrader_Adrian  
    Started by xiinteractive, 04-09-2024, 08:08 AM
    5 responses
    15 views
    0 likes
    Last Post NinjaTrader_Erick  
    Started by swestendorf, Today, 11:14 AM
    2 responses
    6 views
    0 likes
    Last Post NinjaTrader_Kimberly  
    Started by Mupulen, Today, 11:26 AM
    0 responses
    7 views
    0 likes
    Last Post Mupulen
    by Mupulen
     
    Working...
    X