Previous Next

GChartPatterns.ClearPaint()

Deletes all drawings of chart formations from the chart.

void  GChartPatterns.ClearPaint(
   ENUM_TIMEFRAMES            timeFrame = -1   // Zeitrahmen der Werte
);

Parameter

timeFrame

[in]  Timeframe of the prices to be removed. -1 removes all active timeframes.


Beispiel:

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

//--- Creating a pointer to an empty class object
GChartPatterns *chartPatterns;


int OnInit ()
{
   //--- Assign the class to the empty class object
   chartPatterns = gChartPatterns();

   //--- Initialize the data of the class
   chartPatterns.Init();


   return(INIT_SUCCEEDED);
}

void OnDeinit (const int reason)
{
   //--- Release memory when closing
   delete chartPatterns;
}


void OnTick ()
{
   if ( chartPatterns.Ready() ) //--- The function will be executed when all data is ready
   {
      //--- removes all formations from the chart
      chartPatterns.ClearPaint();
   }
}


See also

GChartPatterns.Deinit, GChartPatterns.JustPaint