If I use the statement of : if X = High then Y = 1; each time X = High, Y will be 1. Therefore, when X != High, Y = 0. Which is fine. But, in some cases, I need Y to remain as 1 to show that a high has been reached. Tried a number of approaches, without any luck. Each time X != High, Y = 0. Can someone point me in the right direction as to how I can solve this?
ok, ON = 1 and Off = 0, where is the problem?
In mt4 true = 1 and false = 0.
bool isXhigh = (X == High); // True if X == High, false if X != High
if(isXhigh) ... // "Is X high" is meaningful.
if(y == 0) ... // is not.