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

Indicator - Trading hours

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

    Indicator - Trading hours

    Hello,

    I couldnt find how to add an indicator to a chart for different trading hours. My solution to achieve this would have been to add a 2nd dataseries (with transparent bars) with different trading hours to a chart (having visible bars plotting with instrument settings or 24/5 and adding eg CME RTH hours) and then apply the indicator to that 2nd dataseries.

    Is this possible?

    Thank you!
    Tony

    #2
    Hello tonynt,

    Thank you for your post.

    Are you talking about adding the indicator from a script, or applying the indicator directly to a chart window through the UI? Through the UI your approach would certainly work.

    Thanks in advance; I look forward to assisting you further.
    Kate W.NinjaTrader Customer Service

    Comment


      #3
      Hello Kate,

      thank you for your reply. Sorry, my question was inaccurate. How can I have in a script-indicator eg a SMA working with dataseries of the chart and having another SMA being calculated from CME RTH hours please. It does not make sense with SMA of course, just to explain what I mean for the logic and I want to distinguish this question from the 2nd question.
      The 2nd question is please: how can I use the oderflowVwap in a script indicator? Usually I start everything with strategy-builder and when I understand it there when viewing the code then I add it to my script. But I can not add orderflowvwap with strategybuilder, its not there to select. (I want to calculate the distance of current price from vwap, therefore I need vwap in "another" indicator where I do my calculations. The calculations are not the question, I do for months with calculating current price from closepriorday, openday...)

      Thank you!
      Tony

      Comment


        #4
        Hello tonynt,

        Thank you for your reply.

        While it is possible to use AddDataSeries() to add a data series of a different trading hours template, and have an SMA calculate on that series, it would be important to note that an indicator / strategy with multiple DataSeries of the same instrument will only process realtime OnBarUpdate() calls when a tick occurs in session of the trading hour template of all added series. Any ticks not processed will be queued and processed as a tick comes in for all subsequent DataSeries.

        So essentially, the indicator would only calculate during RTH hours if you tried to add this as a secondary series.

        As far as the Order Flow VWAP, none of the Order Flow items are available for use in the builder. You would have to unlock your code and manually add code to access the Order Flow VWAP values in a script. Information regarding this is available in our help guide here:



        Please let us know if we may be of further assistance to you.

        Kate W.NinjaTrader Customer Service

        Comment


          #5
          Hello Kate,

          thank you for your reply. When I want to add few lines of calculation to orderflowVWAP how can I do this. Usually I take an indicator, save it with a new name and then modify it. But I cant access orderflowVWAP. Maybe it makes also more sense because of CPU-usage to add the few lines to orderflowVWAP instead of creating a new indicator and adding orderflowVWAP(?)

          Thank you!
          Tony

          Comment


            #6
            Hello tonynt,

            Thank you for your reply.

            Unfortunately the Order Flow VWAP is not open source and the source code is not accessible - even those of us in the support department do not have access to the source code. This means you cannot just make a copy and make changes. The Order Flow VWAP is only accessible via the NinjaScript methods in the link I previously posted.

            Please let us know if we may be of further assistance to you.
            Kate W.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by cmtjoancolmenero, Yesterday, 03:58 PM
            1 response
            17 views
            0 likes
            Last Post NinjaTrader_Gaby  
            Started by benmarkal, Yesterday, 12:52 PM
            3 responses
            23 views
            0 likes
            Last Post NinjaTrader_Gaby  
            Started by helpwanted, Today, 03:06 AM
            1 response
            19 views
            0 likes
            Last Post sarafuenonly123  
            Started by Brevo, Today, 01:45 AM
            0 responses
            11 views
            0 likes
            Last Post Brevo
            by Brevo
             
            Started by pvincent, 06-23-2022, 12:53 PM
            14 responses
            244 views
            0 likes
            Last Post Nyman
            by Nyman
             
            Working...
            X