How to get the Ask price in EA

Hey guys. I’m trying to get the price :

#include <Trade\SymbolInfo.mqh>
CSymbolInfo mysymbol;
//+------------------------------------------------------------------+
//| Script program start [function](https://www.mql5.com/en/docs/constants/namedconstants/compilemacros)                                    |
//+------------------------------------------------------------------+
void OnStart()
{
double Ask=mysymbol.Ask();
Print("Ask is : ",Ask);
}

Printed result is 0.0! I don’t know why? Maybe I missed something?

Thank you for your reply

Add this in your code:

mysymbol.RefreshRates();
void OnStart()
  {
   mysymbol.RefreshRates();
   double Ask=mysymbol.Ask();
   Print("Ask is : ",Ask);
  }

Thanks so much! The first time to try mt5 TradeClass : -(