MQL4 Reference Chart Operations ChartSetInteger

ChartSetInteger

Sets a value for a corresponding property of the specified chart. Chart property must be datetime, int, color, bool or char. The command is added to chart message queue and executed only after all previous commands have been processed.

bool  ChartSetInteger(
   long   chart_id,     // Chart ID
   int    prop_id,      // Property ID
   long   value         // Value
   );

Sets a value for a corresponding property of the specified subwindow of the specified chart:

bool  ChartSetInteger(
   long   chart_id,     // Chart ID
   int    property_id,  // Property ID
   uint   sub_window,   // Chart subwindow
   long   value         // Value
   );

Parameters

chart_id

[in]  Chart ID. 0 means the current chart.

prop_id

[in]  Chart property ID. It can be one of the ENUM_CHART_PROPERTY_INTEGER value (except the read-only properties).

sub_window

[in]  Chart subwindow.

value

[in]  Property value.

Return Value

Returns true if the command has been added to chart queue, otherwise false. To get error details use the GetLastError() function.