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 sidlercom80, 10-28-2023, 08:49 AM
        168 responses
        2,262 views
        0 likes
        Last Post sidlercom80  
        Started by Barry Milan, Yesterday, 10:35 PM
        3 responses
        10 views
        0 likes
        Last Post NinjaTrader_Manfred  
        Started by WeyldFalcon, 12-10-2020, 06:48 PM
        14 responses
        1,429 views
        0 likes
        Last Post Handclap0241  
        Started by DJ888, 04-16-2024, 06:09 PM
        2 responses
        9 views
        0 likes
        Last Post DJ888
        by DJ888
         
        Started by jeronymite, 04-12-2024, 04:26 PM
        3 responses
        41 views
        0 likes
        Last Post jeronymite  
        Working...
        X