Previous Next

GBar.Init()

Used to change the Symbol of GBar.

void  GBar.Init(
   string  symbol = NULL  // Symbol
   );

Parameter

symbol

[in]  The symbol whose data should be processed by the class.

Note

The .Init() function call can be used at any point in the code. It can also be used multiple times to change data during runtime.


Example:

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

//--- Allocate 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 exit free memory
   delete bar;
}


See also

GBar