Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Multi-time frame odd behavior

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

    Multi-time frame odd behavior

    I'm working on multi-time frame strategy with a custom indicator that is exhibiting some strange behavior.

    It consists of a 2 brick renko time frame and a 350 tick time frame on the ES. I've coded it so I can run it from either a renko chart or a tick chart, so I can have the two charts side by side with the strategy running on each.

    The strategy has a custom indicator I've created based off of the DonchianChannel indicator that I create and with an instancefor both timeframes. It has a series called Trend that is 1 or -1 based on the trend.

    In my strategy I check the trend series of the renko version of the indicator to see if it has changed on BarUpdate for the renko bars. This is where the weird behavior comes in. Around 8:06:06 AM PST today (11/16/18) it says the trend changed from -1 to 1, and then the next bar says the very same thing. Obviously that shouldn't be possible.

    So basically what I'm seeing is when the strategy is applied to the renko chart it identifies the value change properly. But when run from the tick chart it is doing this strange behavior.

    So I guess my question is do I need to do any special code in the indicator to allow it to work on a multi-time frame strategy?

    I've attached the strategy.

    strategy.zip
    Attached Files

    #2
    Hello calebsandfort,

    Thanks for your post.

    I noticed you are adding the indicators in State.Configure depending on the data series you load. I would suggest moving this code to State.DataLoaded so the indicators are added and reference BarsArray or other information that depends on added data once all the data is loaded.

    Publicly available information on NinjaTrader states can be found here - https://ninjatrader.com/support/help...tatechange.htm

    If this does not resolve your inquiry, could you provide us some steps where we could test the code and observe a difference in behavior?

    I look forward to being of further assistance.

    Comment


      #3
      Hi Jim

      That fixed it. Thank you very much!

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      650 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      370 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      109 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      574 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      577 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X