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

OnMarketData during IsSuspendedWhileInactive

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

    OnMarketData during IsSuspendedWhileInactive

    Hi,

    it seems like that MarketData ticks get lost whole a chart is suspended. Thus, when working with tick replay indicators it isn't possible to activate IsSuspendedWhileInactive, which would be quite handy since all those tick replay indicators are so workload intensive.
    Is there a workaround or something I am missing?
    Otherwise I would request an implementation to handle OnMarketData the same way as OnBarUpdate is handled, during and after IsSuspendedWhileInactive.

    Greetings

    #2
    Hello seykool,

    Thanks for your post.

    After testing a copy of the BuySellVolume indicator with IsSuspendedWhileInactive set to true on a Tick Replay data series, I do see prints missing in the Output window for the time that the indicator was suspended for. For example, if we use 5-second bars and make the indicator inactive at 8:01:15, then make the indicator active again at 8:01:30, prints for the bars in between these times do not appear in the Output window.

    That said, I don't believe any of the indicators that come default with NinjaTrader that would use Tick Replay also have IsSuspendedWhileInactive set to true.

    What Tick Replay indicator are you referring to that also has IsSuspendedWhileInactive set to true?

    Note that by default, IsSuspendedWhileInactive is set to false. However, NinjaScript wizards set it to true.

    I look forward to assisting further.
    Brandon H.NinjaTrader Customer Service

    Comment


      #3
      Hi Brandon,

      exaclty this way is it.
      I am refering to a self-coded indicator. Whether the default indicators have it activated or not, it is handy and I like to have it activated because I don't have always all windows with tick replay indicators open. My computer is anyways already working hard, would be nice to ease it a bit, since this feature is already there, almost.

      Greetings

      Comment


        #4
        Hello seykool,

        Thanks for your note.

        After further testing, IsSuspendedWhileInactive supports OnBarUpdate only and does not support OnMarketData.

        That said, I have submitted a feature request for IsSuspendedWhileInactive supporting OnMarketData.

        The internal tracking number for your feature request is SFT-5394. Please reference this internal tracking number when contacting Platform Support if you ever have questions regarding this feature request.

        When a feature request is implemented, you'll find a description of the new feature in the release notes:In the meantime, you could use IsSuspendedWhileInactive = false, or you could consider using historical-based analysis with a one tick data series and BarsArray[1].GetVolume([CurrentBars[1]) and BarsArray[1].GetAsk and GetBid and GetClose to get close, ask price and bid price for volume analysis.

        See the attached BuySellVolumeOneTick reference sample. This could be compared to the default BuySellVolume indicator to demonstrate a One Tick Indicator vs a Tick Replay Indicator.

        Let us know if we may assist further.
        Attached Files
        Brandon H.NinjaTrader Customer Service

        Comment


          #5
          Hi Brandon,

          that's great, the feature request and the indicator. Highly appreciate it! I wasn't sure how to code it, so I will take it as sample. The only thing is, though, I believe it can't show me bid side or ask side volume this way, right? I need the tick replay for getting delta volume. Is there a way I could get this with a hosted 1 tick series?

          Regards

          Comment


            #6
            Hello seykool,

            Thanks for your note.

            The previously attached indicator, BuySellVolumeOneTick, demonstrates using BarsArray[1].GetAsk and BarsArray[1].GetBid around line 124 in the script to get the ask price and bid price from a 1-tick series for volume analysis.

            See the help guide documentation below for more information.
            GetBid: https://ninjatrader.com/support/help...nt8/getbid.htm
            GetAsk: https://ninjatrader.com/support/help...nt8/getask.htm

            Let us know if we may assist further.
            Brandon H.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by cmtjoancolmenero, 04-29-2024, 03:40 PM
            14 responses
            43 views
            0 likes
            Last Post cmtjoancolmenero  
            Started by Felix Reichert, 04-26-2024, 02:12 PM
            4 responses
            36 views
            0 likes
            Last Post Felix Reichert  
            Started by ETFVoyageur, Yesterday, 06:05 PM
            6 responses
            36 views
            0 likes
            Last Post ETFVoyageur  
            Started by rbeckmann05, Today, 02:35 PM
            1 response
            5 views
            0 likes
            Last Post NinjaTrader_BrandonH  
            Started by Torontobluejays, Yesterday, 08:43 AM
            6 responses
            33 views
            0 likes
            Last Post rc5781
            by rc5781
             
            Working...
            X