Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

understanding steps in strategy analyzer

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

    understanding steps in strategy analyzer

    When I run strategy analyzer with a Print(Time[0]) in OnBarUpdate, I notice it doesn't start printing to the screen until about 5 minutes into the strategy analyzer. What is occurring in that 5 minutes?

    I ask because sometimes my strategy analyzer gives me an error in the log that says "Error on calling 'OnBarUpdate' method on bar 1696"; But the error occurs BEFORE anything prints from my Print(Time[0]) statement. How can that be? I'd expect to have 1695 Print statements executed before getting an error on bar 1696.

    #2
    Hello YD777,

    Thanks for opening the thread.

    The prints should occur as OnBarUpdate() is being iterated in the Strategy Analyzer.

    It could be that you are loading a large amount of data before the Strategy Analyzer begins calling OnBarUpdate(). I would suggest to test with a smaller period of time to see if your prints still take as long to show up in the output window.

    I have attached a very simple strategy that prints to the output window and does some very simple trades. I tested this with a Time frame from January 1 2017 to May 31st 2017. I observed that the prints did not occur when data was loading, but were printing while the Strategy Analyzer was reporting "Running backtest on ES 06-17 ..."

    I've created a video demonstrating as well: https://www.screencast.com/t/kFV2Iipj

    Please let me know if I may be of further assistance.
    Attached Files

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    72 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    44 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    26 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    30 views
    0 likes
    Last Post TheRealMorford  
    Started by Mindset, 02-28-2026, 06:16 AM
    0 responses
    61 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Working...
    X