You should first see if the amount of available history is enough for your request. You may want 7200, but the amount of chart history may only have 4585 to offer.
So verify that you have that amount of data available. Read the documentation on the function iBars() as well SeriesInfoInteger() and the following properties:
ENUM_SERIES_INFO_INTEGER
Identifier
Description
Type
SERIES_BARS_COUNT
Bars count for the symbol-period for the current moment
long
SERIES_FIRSTDATE
The very first date for the symbol-period for the current moment
datetime
SERIES_LASTBAR_DATE
Open time of the last bar of the symbol-period
datetime
SERIES_SERVER_FIRSTDATE
The very first date in the history of the symbol on the server regardless of the timeframe
datetime
SERIES_TERMINAL_FIRSTDATE
The very first date in the history of the symbol in the client terminal, regardless of the timeframe
datetime
SERIES_SYNCHRONIZED
Symbol/period data synchronization flag for the current moment
bool

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi everyone,
I am trying to get a 7200 close quotes from CopyClose. It is working well however I do not know if I have enough elements in my array/chart. Heres my code:
a: 7200
b: 4585
These values come from the terminal after the script is executed. It is very important that I get 7200 values. Is there any way I can do this? When I try to find Close_Array[] values greater than 4585 then I get out of bounds exception.