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 CaptainJack, 05-29-2026, 05:09 AM
    0 responses
    178 views
    0 likes
    Last Post CaptainJack  
    Started by CaptainJack, 05-29-2026, 12:02 AM
    0 responses
    99 views
    0 likes
    Last Post CaptainJack  
    Started by charlesugo_1, 05-26-2026, 05:03 PM
    0 responses
    131 views
    0 likes
    Last Post charlesugo_1  
    Started by DannyP96, 05-18-2026, 02:38 PM
    1 response
    210 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 05-11-2026, 05:56 AM
    0 responses
    186 views
    0 likes
    Last Post CarlTrading  
    Working...
    X