Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Debug/Step through with Multi-Timeframe

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

    Debug/Step through with Multi-Timeframe

    Hi. While writing/debugging, I like the ability to step through one bar at a time to print debug values, make changes to my script, and then reload with the F5-key. However, if I simply add the following line, the indicator immediately steps through all the bars on the chart...

    Add(PeriodType.Minute, 1);

    Hope I'm missing something here. Is there a way to add multi-timeframe so that I can still step through the historical chart one bar at a time?

    Thank You,
    Doug

    Further detail: As a simple test, I took the default indicator script and only added the above line to initialize, and added one line to print current bar number. All bar numbers were immediately listed in the Ourput window.

    #2
    Doug,

    OnBarUpdate() will be called for each bar series added. Try isolating using BarsInProgress.

    In other words:
    if (BarsInProgress == 0) //BarsInProgress == 0 for primary, BarsInProgress == 1 for next etc
    {
    //Do something
    }

    VT

    Comment


      #3
      Doug, correct this would be an expected difference in loading of the bars series indexes for single vs multi series scripts.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      666 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      377 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      110 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      575 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      580 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X