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

Display Halt time remaining

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

    Display Halt time remaining

    1. I want to display the time remaining for a circuit breaker halt on my chart. Can you suggest code samples to accomplish this.

    2. I have tried numerous chart settings for tick charts and minute charts and it seems all settings do not indicate a Halt. No bars are shown during the halt. Is there a setting (or work around) that will visually show me the halt has occurred?

    I do not have a level II data feed.

    Thanks

    #2
    Hello CKnudsen,

    Thanks for opening the thread.

    To accomplish this goal, I would suggest to use a SessionIterator to get the times on the session for your data series that you attach an indicator to. You can also use an additional data series for a different TradingHours template, so you can get the times of RTH trading hours so they can be displayed on a chart using an ETH trading hours template.

    Since there would not be any data iterating at this time, OnBarUpdate() will not iterate. I would suggest to then implement a timer and a custom event into the indicator so it can display the time remaining when DateTime.Now is within a certain bounds. The SampleCustomEvents script on our forums demonstrates how a timer can be implemented in NinjaScript.

    I'll include links to publicly available documentation and with sample code and the sample script that implements a timer.

    SessionIterator - https://ninjatrader.com/support/help...oniterator.htm

    AddDataSeries() (To add another data series for displaying other sessions) - https://ninjatrader.com/support/help...dataseries.htm

    Multi Series NinjaScript documentation (Important read for Multi Series NinjaScripts) - https://ninjatrader.com/support/help...nstruments.htm

    SampleCustomEvents (Implements a timer for custom events) - https://ninjatrader.com/support/foru...ead.php?t=5965

    Please let me know if I can be of further assistance.
    JimNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by pmachiraju, 11-01-2023, 04:46 AM
    8 responses
    147 views
    0 likes
    Last Post rehmans
    by rehmans
     
    Started by mattbsea, Today, 05:44 PM
    0 responses
    5 views
    0 likes
    Last Post mattbsea  
    Started by RideMe, 04-07-2024, 04:54 PM
    6 responses
    33 views
    0 likes
    Last Post RideMe
    by RideMe
     
    Started by tkaboris, Today, 05:13 PM
    0 responses
    5 views
    0 likes
    Last Post tkaboris  
    Started by GussJ, 03-04-2020, 03:11 PM
    16 responses
    3,282 views
    0 likes
    Last Post Leafcutter  
    Working...
    X