How do I make sure that my EA has the up to date Market Info?

 

In my code, I have a lot of these...

//---------------------------------------------------------------

double eurusdask = MarketInfo("EURUSD",MODE_ASK);

//---------------------------------------------------------------


and a lot of these...


//---------------------------------------------------------------

if(iHigh("EURUSD",240,6)<eurusdbid)

      {

        usd = usd - 1;

        eur = eur + 1;

      }

//--------------------------------------------------------------


How do I make sure that the information these lines give is refreshed and up to date?

Reason: