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 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