Previous Next


This function is used to prepare the pivot data of GSupportAndResistance.

The call must take place before the first call of a data-reading function.

void  GSupportAndResistance.InitPivots(
   string   Periodes = "MN1,W1,D1"    // Timeframes in short notation



[in]  The timeframes on which the class should process the data. These are specified in shorthand and separated by a comma without spaces. "H1,W1" thus corresponds to PERIOD_H1 and PERIOD_W1 or 1 hour and 1 week.


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

//--- Create a pointer to an empty class object
GSupportAndResistance *supportAndResistance;

int OnInit ()
   //--- Assign the class to the empty class object
   supportAndResistance = gSupportAndResistance();

   //--- Initialize the class data

   //--- Initialize the pivot points


void OnDeinit (const int reason)
   //--- Free up memory on exit
   delete supportAndResistance;

See also

SupportAndResistance, GSupportAndResistance.GetPivots, GSupportAndResistance.Init, GSupportAndResistance.SetFontSize, GSupportAndResistance.SetMarkersLengthRight