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 cre8able, Yesterday, 01:16 PM
    3 responses
    11 views
    0 likes
    Last Post cre8able  
    Started by Harry, 05-02-2018, 01:54 PM
    10 responses
    3,203 views
    0 likes
    Last Post tharton3  
    Started by ChartTourist, Today, 08:22 AM
    0 responses
    6 views
    0 likes
    Last Post ChartTourist  
    Started by LiamTwine, Today, 08:10 AM
    0 responses
    2 views
    0 likes
    Last Post LiamTwine  
    Started by Balage0922, Today, 07:38 AM
    0 responses
    5 views
    0 likes
    Last Post Balage0922  
    Working...
    X