ChartGetInteger() returns a "long", not an "int".
Then they need to fix this doc:
Example:
void OnStart() { int height=ChartGetInteger(0,CHART_HEIGHT_IN_PIXELS,0); int width=ChartGetInteger(0,CHART_WIDTH_IN_PIXELS,0); Print("CHART_HEIGHT_IN_PIXELS =",height,"pixels"); Print("CHART_WIDTH_IN_PIXELS =",width,"pixels"); }https://docs.mql4.com/chart_operations/chartgetinteger
The docs are correct! It is just the example that is outdated for "strict" compilation, although probably still valid for the old style of non-strict compilation.
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
The next very simple piece of code...
.. produces a beautiful compiler warning.. :
possible loss of data due to type conversion Nique - BO5M.mq4 64 22