Previous Next


Enables or disables the drawing of the formations that are in progress.

This function does not have to be executed with every tick.

void  GChartPatterns.SetPaintBuild(
   bool  paint = true  // If true, formations are drawn



[in]  If true, then the creation of the formations will be painted continuously.


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

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

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

   //--- Initialize the class data

   //--- Suppress drawing of emerging formations

   //--- Disable drawing of finished formations


void OnDeinit (const int reason)
   //--- Release memory on exit
   delete chartPatterns;

void OnTick
() {
   if (CurrentBar == 0)                                                                                                                                                                                                                                                                                                                                                                                                                                                      ( chartPatterns.Ready() ) //--- Runs only when all data is ready
      //--- Does not draw on the chart because SetPaintBuild and SetPaintFinish are false

See also

GChartPatterns.SetPaintFinish, GChartPatterns.JustPaint, GChartPatterns.ClearPaint