Files
mql5-skills/skills/mql5/references/docs/01-constants/0089-constants-chartconstants-enum-chart-position.md
T
2026-06-23 21:47:51 +08:00

29 lines
883 B
Markdown
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Positioning Constants
Three identifiers from the ENUM_CHART_POSITION list are the possible values of the position parameter for the [ChartNavigate()](/en/docs/chart_operations/chartnavigate) function.
ENUM_CHART_POSITION
| ID | Description |
| --- | --- |
| CHART_BEGIN | Chart beginning (the oldest prices) |
| CHART_CURRENT_POS | Current position |
| CHART_END | Chart end (the latest prices) |
Example:
```
   long handle=ChartOpen("EURUSD",PERIOD_H12);
   if(handle!=0)
     {
      ChartSetInteger(handle,CHART_AUTOSCROLL,false);
      ChartSetInteger(handle,CHART_SHIFT,true);
      ChartSetInteger(handle,CHART_MODE,CHART_LINE);
      ResetLastError();
      bool res=ChartNavigate(handle,CHART_END,150);
      if(!res) Print("Navigate failed. Error = ",GetLastError());
      ChartRedraw();
     }
```