Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Indicator with time shift

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

    Indicator with time shift

    I'm trying to shift an indicator by a fraction of its bar size.
    For example, say need an SMA running of 1-hour bars, but not on round-hours, but shifted by half an hour, i.e. its input should be the OHLC of 9:30-10:30, 10:30-11:30 and so forth.

    What's the most efficient way of doing so?

    Thanks,
    Boaz

    #2
    Hi Boaz,

    This would be controlled by the start time of the session, defined by session template. It needs to start at the half hour in order for end time of bars to be at the :30 instead of :00. For an example of such a session template, look under Tools > Session manager and select CME US Index Futures RTH or ETH.
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      Hi Ryan,

      I guess I didn't explain myself clearly:
      My strategy runs on 1-min bars, and uses indicators of various time spans. I want to be able to use indicators which are driven by 1-hour bars, at any (predefined) shift.
      The session will still has to match the instrument (in my case CME FX ETH).

      For example, I want an 4-SMA's which operate on the High of:
      a) 9:00-10:00, 10:00-11:00, ...
      b) 9:15-10:15, 10:15-11:15,...
      c) 9:30-10:30, 10:30-11:30,...
      d) 9:45-10:45, 10:45-11:45,...

      I was thinking of using 15-min bars, and to somehow "collapse" the data in different shifts in the Indicator itself.

      - Boaz

      Comment


        #4
        If you want to custom code a range of times the indicator is calculated on, the following sample could help:
        Ryan M.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by GussJ, 03-04-2020, 03:11 PM
        11 responses
        3,229 views
        0 likes
        Last Post xiinteractive  
        Started by andrewtrades, Today, 04:57 PM
        1 response
        14 views
        0 likes
        Last Post NinjaTrader_Manfred  
        Started by chbruno, Today, 04:10 PM
        0 responses
        7 views
        0 likes
        Last Post chbruno
        by chbruno
         
        Started by josh18955, 03-25-2023, 11:16 AM
        6 responses
        441 views
        0 likes
        Last Post Delerium  
        Started by FAQtrader, Today, 03:35 PM
        0 responses
        12 views
        0 likes
        Last Post FAQtrader  
        Working...
        X