Announcement

Collapse
No announcement yet.

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:

        https://ninjatrader.com/support/help...hlightsub=vwap

        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 jleira, Today, 07:08 PM
            0 responses
            1 view
            0 likes
            Last Post jleira
            by jleira
             
            Started by varsha, Today, 06:33 PM
            0 responses
            17 views
            0 likes
            Last Post varsha
            by varsha
             
            Started by NtFan, Today, 04:12 PM
            1 response
            8 views
            0 likes
            Last Post NtFan
            by NtFan
             
            Started by futurenow, Today, 01:44 PM
            2 responses
            38 views
            0 likes
            Last Post voltation  
            Started by Gerik, Today, 12:44 PM
            1 response
            15 views
            0 likes
            Last Post NinjaTrader_Jim  
            Working...
            X