Counter isn’t working

Viewing 4 posts - 1 through 4 (of 4 total)
  • #214226


    I’m working on a code that should only buy when the condition occurs for the second or more times. Unfortunately, I’m facing an issue where the counter doesn’t seem to increase and remains at 1, causing the “IF counter>x” condition to always return the same result, regardless of x.


    et comme ceci




    Hi Andres,

    Start out with this :

    If you don’t do this, counter will have an undefined value which probably is a huge negative number. So it will add up, but only when a new day has started, it will reset to 0 for the first time.
    Maybe what fifi added helps too ( I don’t readily see why he does it) and possibly it is so that both amendments are required to get it going.

    You can let your code end with

    Then you can see what values these variables receive.


    Thank you very much fifi743 and PeterSt for your answers. Thanks PeterSt specially for the command “graph” I didn’t know it.

    Actually the code was working I could see it with “graph counter”. The problem is that it jumps from 0 to 4, or to 0 to 20, etc. So I’m going to adjust it to start from 4, or something else.


Viewing 4 posts - 1 through 4 (of 4 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login