Help, storing a variable

 

 hi all, i would like to know how to store a value.

if (fractalup>0)                               
         {
         pastfractalup=fractalup;
         }

 as shown in above i had assign a value to the variable with a condition, but now the question is, how do i keep the last variable when now the condition is not met.

 
Search the forum about. Global Variable Scope. Static Variables. GlobalVariableSet(). File Functions and Coding EA for Self Recovery.
Reason: