Announcement

Collapse
No announcement yet.

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 aligator, Today, 02:09 PM
    2 responses
    14 views
    0 likes
    Last Post Harry
    by Harry
     
    Started by NinjaTrader_Kate, Today, 02:40 PM
    0 responses
    5 views
    0 likes
    Last Post NinjaTrader_Kate  
    Started by patpat, Today, 11:34 AM
    1 response
    6 views
    0 likes
    Last Post NinjaTrader_ChrisL  
    Started by crystalet, Today, 10:41 AM
    3 responses
    14 views
    0 likes
    Last Post crystalet  
    Started by tonynt, Today, 10:47 AM
    3 responses
    16 views
    0 likes
    Last Post NinjaTrader_ChrisL  
    Working...
    X