Previous Next

GBar.Ask()

Returns the current Ask price.

double  GBar.Ask();

Return Value

Returns the current ask price.


Example:

//--- Include Glib Classes
#include <Glib.mqh>

//--- Create a pointer to an empty class object
GBar *bar;


int OnInit ()
{
   //--- Assign class to empty class object
   bar = gBar();

   return(INIT_SUCCEEDED);
}

void OnDeinit (const int reason)
{
   //--- On termination release memory
   delete bar;
}


void OnTick ()
{
   //--- Display the current Ask price
   Print( bar.Ask() );
}


See also

GBar.Bid, GBar.Spread