Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Is BackFill Data for OnBarUpdate()

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

    Is BackFill Data for OnBarUpdate()

    Hi,

    How can i determine if a bar is realtime or backfill? I need this because I am firing a TextToSpeech alert function, and I dont want it to fire on backfill data bars.

    Thanks in advance.

    #2
    Hello KhaosTrader,

    Thanks for your post.

    You can test for what state the indicator is in.

    For example, in the OnBarUpdate() method you could:

    if (State == State.Historical) return;

    // live data only

    //text to speech code here
    Paul H.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by sightcareclickhere, Today, 01:55 PM
    0 responses
    1 view
    0 likes
    Last Post sightcareclickhere  
    Started by Mindset, 05-06-2023, 09:03 PM
    9 responses
    258 views
    0 likes
    Last Post ender_wiggum  
    Started by Mizzouman1, Today, 07:35 AM
    4 responses
    18 views
    0 likes
    Last Post Mizzouman1  
    Started by philmg, Today, 01:17 PM
    1 response
    7 views
    0 likes
    Last Post NinjaTrader_ChristopherJ  
    Started by cre8able, Today, 01:01 PM
    1 response
    9 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Working...
    X