Previous Next

GBar.Spread()

Returns the current spread.

double  GBar.Spread();

Return value

Returns the current spread.


Beispiel:

//--- 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)
{
   //--- When exiting, free memory
   delete bar;
}


void OnTick ()
{
   //--- Print the current spread
   Print( bar.Spread() );
}


See also

GBar.Bid, GBar.Ask