Duxx![]() Elite ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 881 Joined: 2/18/2009 ![]() | Matt or someone else Im trying to figure out the logic on the counter you kindly provided, trying to learn how this works. First the system try to find the pattern, and when it finds the pattern, the the counter is set to zero with nBarsSincePattern = 0 If the pattern is not found, the pattern = 1 with nBarsSincePattern +=1 But Matt mentioned that the above formula nBarsSincePattern +=1 is more like an increase by 1, so can I assume that by setting up nBarsSincePattern as integer (does this means any integer or just the number 1 integer?) then the + sign on the formula would increase the integer by 1? Im also unclear why this function H[nBarsSincePattern + 1] requires the + 1 Your guidance is appreciated |