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 Hwop38, 05-04-2026, 07:02 PM
      0 responses
      161 views
      0 likes
      Last Post Hwop38
      by Hwop38
       
      Started by CaptainJack, 04-24-2026, 11:07 PM
      0 responses
      309 views
      0 likes
      Last Post CaptainJack  
      Started by Mindset, 04-21-2026, 06:46 AM
      0 responses
      245 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by M4ndoo, 04-20-2026, 05:21 PM
      0 responses
      349 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by M4ndoo, 04-19-2026, 05:54 PM
      0 responses
      179 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Working...
      X