Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Error message index range

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

    Error message index range

    Hello,

    I´m working with different dataseries in scripts for long time now. Today appears the attached message and I have no idea why.

    I add the dataseries AddDataSeries("NQ 12-19", BarsPeriodType.Range, 4);
    and I have in OnBarUpdate if (CurrentBars[0] < 5 || CurrentBars[1] < 5) return;
    and as entry condtion
    if(Position.MarketPosition != MarketPosition.Short
    && Closes[1][1]>Opens[1][1]
    && Closes[1][0]<Opens[1][0])

    What might be the reason for this message please?

    Thank you!
    Tony
    Attached Files

    #2
    Hello tonynt,

    Thank you for your post.

    What is the primary data series you're running the script on?

    Are you able to reproduce this error if you're running this in a backtest over the same time frame on the same instrument? Using the playback connection on Historical data? With Market Replay data?

    Thanks in advance; I look forward to assisting you further.

    Comment


      #3
      Hello,

      thank you for your reply. In the meantime I figured it out I think. I had the code in the wrong part of my script where I have the OnButtonClick....
      So, I removed it there and use the bool from OnButtonClick to have it working in OnBarUpdate. Now there is no more error message.

      Best regards
      Tony

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by NullPointStrategies, Today, 05:17 AM
      0 responses
      46 views
      0 likes
      Last Post NullPointStrategies  
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      126 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      66 views
      0 likes
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      42 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