Come on, you can solve this yourself :), don't kidding around, we know you can solve this, it just a matter of coding.
In any EA, CI or Script:
double My_Var = 0.0; // this is set as global variable or static local variable
if (My_Var == 0.0) My_Var = 1.618;
//--- codes and codes goes here
if (re_initialize == true) My_Vars = 0.0; // re-initialize again on next tick.
click that delete link dude :)