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 CarlTrading, 03-31-2026, 09:41 PM
    1 response
    41 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    20 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    29 views
    1 like
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    46 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    37 views
    0 likes
    Last Post CarlTrading  
    Working...
    X