wouldn't the result be 11? newUpTick (this is 10) + 1 = 11.
Additionally with your loop you overwrite the result again, so regardless of how many symbols fulfill your condition the result would always come out as previous value + 1 and not previous value + number of symbols that fulfilled your condition. That's likely why you see the counters grow by one for each bar on the chart (with a reset in case no symbol matches your conditions on a bar).
This is something you should check using print statements within your code to confirm that this actually is the issue.
what do the print statements tell you? I can't help you with these as I a.) don't know where you added them and b.) my suggestion was meant to help you understanding what is going on in your code.
We know that newupTick = newUptick + 1; isn't giving you the result you are looking for as it doesn't track how many of the symbols fulfill the condition (the outcome will always be previous value + 1 regardless of how many symbols fulfill your check).
Your code needs something along the lines of:
1. Reset a counter to 0 at the beginning of the bar (or at the end of the bar, but place it at the end of your code)
2. For every symbol that fulfills your condition you want to check for add +1 during your loop. Don't overwrite the previous checks result with each new check, but add to it.
3. After the loop you can compute the final result by adding the counter result to result on the previous bar.
I'll gladly help you to steer you in the right direction, but I don't plan to "spoon feed" you with the final code - simply because you'll learn much more and benefit by the first approach. If this is not what you have in mind, please let me know and I'll refrain from posting in here, as I have no intention to waste your time.
By the way you can show your appreciation for any post on futures.io by clicking the "Thanks" button next to it.