Previous Next


Returns the current bid price.

double  GBar.Bid();

Return value

Returns the current bid.


//--- Include the Glib classes
#include <Glib.mqh>

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

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


void OnDeinit (const int reason)
   //--- When finished free memory
   delete bar;

void OnTick ()
   //--- Outputs the current Bid price
   Print( bar.Bid() );

See also

GBar.Ask, GBar.Spread