MQL4 Chart Properties
This documentation details MQL4 functions for managing chart properties. Each property has associated Get and Set functions (where applicable) that interact with the MetaTrader 4/5 terminal.
Core Chart Properties
ChartBringToTop(long chart_ID=0)
ChartMouseScrollGet(bool &result, long chart_ID=0)
* ChartMouseScrollSet(bool value, long chart_ID=0)
ChartEventMouseMoveGet(bool &result, long chart_ID=0)
* ChartEventMouseMoveSet(bool value, long chart_ID=0)
ChartEventObjectCreateGet(bool &result, long chart_ID=0)
* ChartEventObjectCreateSet(bool value, long chart_ID=0)
ChartEventObjectDeleteGet(bool &result, long chart_ID=0)
* ChartEventObjectDeleteSet(bool value, long chart_ID=0)
ChartModeGet(long chart_ID=0) returns ENUM_CHART_MODE.
* ChartModeSet(long value, long chart_ID=0)
ChartForegroundGet(bool &result, long chart_ID=0)
* ChartForegroundSet(bool value, long chart_ID=0)
ChartShiftGet(bool &result, long chart_ID=0)
* ChartShiftSet(bool value, long chart_ID=0)
ChartAutoscrollGet(bool &result, long chart_ID=0)
* ChartAutoscrollSet(bool value, long chart_ID=0)
ChartScaleGet(long chart_ID=0) returns int.
* ChartScaleSet(long value, long chart_ID=0)
ChartScaleFixGet(bool &result, long chart_ID=0)
* ChartScaleFixSet(bool value, long chart_ID=0)
ChartScaleFix11Get(bool &result, long chart_ID=0)
* ChartScaleFix11Set(bool value, long chart_ID=0)
ChartScalePerBarGet(bool &result, long chart_ID=0)
* ChartScalePerBarSet(bool value, long chart_ID=0)
ChartShowOHLCGet(bool &result, long chart_ID=0)
* ChartShowOHLCSet(bool value, long chart_ID=0)
ChartShowBidLineGet(bool &result, long chart_ID=0)
* ChartShowBidLineSet(bool value, long chart_ID=0)
ChartShowAskLineGet(bool &result, long chart_ID=0)
* ChartShowAskLineSet(bool value, long chart_ID=0)
ChartShowLastLineGet(bool &result, long chart_ID=0)
* ChartShowLastLineSet(bool value, long chart_ID=0)
ChartShowPeriodSeparatorGet(bool &result, long chart_ID=0)
* ChartShowPeriodSepapatorSet(bool value, long chart_ID=0)
ChartShowGridGet(bool &result, long chart_ID=0)
* ChartShowGridSet(bool value, long chart_ID=0)
ChartShowVolumesGet(long chart_ID=0) returns ENUM_CHART_VOLUME_MODE.
* ChartShowVolumesSet(long value, long chart_ID=0)
ChartShowObjectDescriptionGet(bool &result, long chart_ID=0)
* ChartShowObjectDescriptionSet(bool value, long chart_ID=0)
ChartVisibleBars(long chart_ID=0) returns int.
ChartWindowsTotal(long chart_ID=0) returns int.
ChartWindowsIsVisible(bool &result, long chart_ID=0, int sub_window=0)
ChartWindowsHandle(long chart_ID=0) returns int.
ChartWindowsYDistance(long chart_ID=0, int sub_window=0) returns int.
ChartFirstVisibleBar(long chart_ID=0) returns int.
ChartWidthInBars(long chart_ID=0) returns int.
ChartWidthInPixels(long chart_ID=0) returns int.
ChartHeightInPixelsGet(long chart_ID=0, int sub_window=0) returns int.
* ChartHeightInPixelsSet(int value, long chart_ID=0, int sub_window=0)
ChartBackColorGet(long chart_ID=0) returns color.
* ChartBackColorSet(color clr, long chart_ID=0)
ChartForeColorGet(long chart_ID=0) returns color.
* ChartForeColorSet(color clr, long chart_ID=0)
ChartGridColorGet(long chart_ID=0) returns color.
* ChartGridColorSet(color clr, long chart_ID=0)
ChartVolumeColorGet(long chart_ID=0) returns color.
* ChartVolumeColorSet(color clr, long chart_ID=0)
ChartUpColorGet(long chart_ID=0) returns color.
* ChartUpColorSet(color clr, long chart_ID=0)
ChartDownColorGet(long chart_ID=0) returns color.
* ChartDownColorSet(color clr, long chart_ID=0)
ChartLineColorGet(long chart_ID=0) returns color.
* ChartLineColorSet(color clr, long chart_ID=0)
ChartBullColorGet(long chart_ID=0) returns color.
* ChartBullColorSet(color clr, long chart_ID=0)
ChartBearColorGet(long chart_ID=0) returns color.
* ChartBearColorSet(color clr, long chart_ID=0)
ChartBidColorGet(long chart_ID=0) returns color.
* ChartBidColorSet(color clr, long chart_ID=0)
ChartAskColorGet(long chart_ID=0) returns color.
* ChartAskColorSet(color clr, long chart_ID=0)
ChartLastColorGet(long chart_ID=0) returns color.
* ChartLastColorSet(color clr, long chart_ID=0)
ChartStopLevelColorGet(long chart_ID=0) returns color.
* ChartStopLevelColorSet(color clr, long chart_ID=0)
ChartShowTradeLevelsGet(bool &result, long chart_ID=0)
* ChartShowTradeLevelsSet(bool value, long chart_ID=0)
ChartDragTradeLevelsGet(bool &result, long chart_ID=0)
* ChartDragTradeLevelsSet(bool value, long chart_ID=0)
ChartShowDateScaleGet(bool &result, long chart_ID=0)
* ChartShowDateScaleSet(bool value, long chart_ID=0)
ChartShowPriceScaleGet(bool &result, long chart_ID=0)
* ChartShowPriceScaleSet(bool value, long chart_ID=0)
ChartShiftSizeGet(long chart_ID=0) returns double.
* ChartShiftSizeSet(double value, long chart_ID=0)
CheckChartOffline(long chart_ID=0) returns bool.
ChartFixedPositionGet(long chart_ID=0) returns double.
* ChartFixedPositionSet(double value, long chart_ID=0)
ChartFixedMaxGet(long chart_ID=0) returns double.
* ChartFixedMaxSet(double value, long chart_ID=0)
ChartFixedMinGet(long chart_ID=0) returns double.
* ChartFixedMinSet(double value, long chart_ID=0)
ChartPointsPerBarGet(long chart_ID=0) returns double.
* ChartPointsPerBarSet(double value, long chart_ID=0)
ChartPriceMin(long chart_ID=0, int sub_window=0) returns double.
ChartPriceMax(long chart_ID=0, int sub_window=0) returns double.Chart Properties Panel
A panel is provided for managing chart properties, including labels for property names and values, and buttons to cycle through options. It handles integer, double, and string properties, with specific logic for color and enumeration types. The panel dynamically adjusts based on available chart properties.