Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Multi Timeframe and Strategy

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

    Multi Timeframe and Strategy

    Hi!
    i saw the post # 105183 and this video (https://paul-ninjatrader.tinytake.co...QxNl82NDM3NjQx)
    and tried to rebuild.
    unfortunaltely i receive an error message:
    "Error on calling ''OnBarUpdate" method. You are accessing an index with a value that is invalide since its out of range...."

    attached the draft i tried

    what's wrong?
    is there a way to run this in strategy builder / strategy analyzer without manual coding?
    in case there is a way, how do i have to do it?
    thank you
    Attached Files

    #2
    Hello Tradexxx,

    Thanks for your post.

    The issue is likely that the code is trying to access a bar from the added data series before there is any bar loaded. For example if the added data series is 15 minute bars and you apply the strategy to a 1 minute chart then on the first bar of the 1 minute data series your code is trying to access the current bar of the 15 minute series which hasn't even loaded the first 15 minute bar yet. What you would need to do is, in each set that would access the added data series, include a check to make sure that the current bar of the added data series is greater than 1.

    I've attached an example of this that shows the end statement in the set and then the edit window that shows how it is constructed.

    Click image for larger version

Name:	Tradexxx-1.PNG
Views:	323
Size:	45.7 KB
ID:	1063251

    Comment


      #3
      Hi Paul!
      Thank you very much for the info!!

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by NullPointStrategies, Today, 05:17 AM
      0 responses
      25 views
      0 likes
      Last Post NullPointStrategies  
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      121 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      64 views
      0 likes
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      41 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      46 views
      0 likes
      Last Post TheRealMorford  
      Working...
      X