How to get EA to remember value of variable from one tick to next

 
Hi I'm trying to get an expert adviser to remember the highest ask or bid value as an order goes along with some code like this:

if(Bid>HPriceB && OrderType()==OP_BUY && OrderMagicNumber()==1)
{
HPriceB=Bid;
}

But it seems every time it reruns the adviser with each tick , it forgets the value of HPriceB and resets it to zero. What do I do to get it to remember the value?
 
define variable in the global scope. Read "MQL4: Global variables"
Reason: