• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

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.
    JimNinjaTrader Customer Service

    Comment


      #3
      Hi Jim

      That fixed it. Thank you very much!

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Splex, 04-15-2018, 07:28 PM
      13 responses
      1,951 views
      0 likes
      Last Post NinjaTrader_PaulH  
      Started by simonkloot, Today, 04:14 AM
      1 response
      4 views
      0 likes
      Last Post NinjaTrader_ChrisSch  
      Started by percma, Today, 02:00 AM
      0 responses
      4 views
      0 likes
      Last Post percma
      by percma
       
      Started by antrux, Yesterday, 06:26 PM
      0 responses
      5 views
      0 likes
      Last Post antrux
      by antrux
       
      Started by kevinenergy, Yesterday, 03:34 PM
      0 responses
      16 views
      0 likes
      Last Post kevinenergy  
      Working...
      X