Ochange function

 

Hi


How to do a function that observes a variable and check if it's changing.

Something like this? "HAS CHANGED" is just for showing the logics that i am looking for.

double low_f = Low[iLowest(NULL,0,MODE_LOW,52,1)];


if(low_f HAS CHANGED) {

Print("Value has changed new low_f value is" low_f);

}
   


Or another way that i think can work is to somehow store the "low_f" value from last tick. And compare to current tick "low_f" value.? But how is the correct way of doing that?

 
!=
 
Marco vd Heijden: Where shall i use !=   ?
 
if(something_1 != something_2)
 {
  // Do something...
 }
 

Offcourse stupid me!


Thanks for the help