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 maybeimnotrader, Today, 05:46 PM
        0 responses
        6 views
        0 likes
        Last Post maybeimnotrader  
        Started by quantismo, Today, 05:13 PM
        0 responses
        6 views
        0 likes
        Last Post quantismo  
        Started by AttiM, 02-14-2024, 05:20 PM
        8 responses
        166 views
        0 likes
        Last Post jeronymite  
        Started by cre8able, Today, 04:22 PM
        0 responses
        8 views
        0 likes
        Last Post cre8able  
        Started by RichStudent, Today, 04:21 PM
        0 responses
        5 views
        0 likes
        Last Post RichStudent  
        Working...
        X