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
        170 responses
        2,273 views
        0 likes
        Last Post sidlercom80  
        Started by Irukandji, Yesterday, 02:53 AM
        2 responses
        17 views
        0 likes
        Last Post Irukandji  
        Started by adeelshahzad, Today, 03:54 AM
        0 responses
        3 views
        0 likes
        Last Post adeelshahzad  
        Started by CortexZenUSA, Today, 12:53 AM
        0 responses
        3 views
        0 likes
        Last Post CortexZenUSA  
        Started by CortexZenUSA, Today, 12:46 AM
        0 responses
        1 view
        0 likes
        Last Post CortexZenUSA  
        Working...
        X