GChartPatterns.SetPaintBuild()
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
);
|
Parameter
paint
[in] If true, then the creation of the formations will be painted continuously.
Example:
//--- 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
chartPatterns.Init();
//--- Suppress drawing of emerging formations
chartPatterns.SetPaintBuild(false);
//--- Disable drawing of finished formations
chartPatterns.SetPaintFinish(false);
return(INIT_SUCCEEDED);
}
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
chartPatterns.JustPaint();
}
}
|
See also
GChartPatterns.SetPaintFinish, GChartPatterns.JustPaint, GChartPatterns.ClearPaint