Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strange indicator behavior in first five non-historical periods

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

    Strange indicator behavior in first five non-historical periods

    I have a tick-by-tick indicator that is behaving strangely. The internal workings are very complicated, so I'll spare the details for now; however, I'm wondering whether anyone else has seen something similar.

    One example is a two-dimensional array that I reset on the first tick of each bar (it doesn't look across periods at all -- it just accumulates volume counts for different price levels within a single period). Inside a code block controlled by the condition "if (FirstTickOfBar)", the code block for the array reset is controlled by the condition "if (!Historical)". On the first five real-time bars (i.e., not historical), it's like the array doesn't get reset at the beginning of each period (values accumulate across periods, resulting in wacky numbers).

    I checked the log and trace file, but no errors. Anyone?

    Thank you.


    Regards,

    #2
    I suggest starting from scratch by a simple as possible indicator, putting in print statements to debug and re-add your custom logic until it finally breaks.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    581 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    338 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    103 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    554 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    552 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X