TradeMUX SDK Documentation
1.0
TradeMUX SDK Documentation
|
int CopyRates | ( | string | symbol_name, |
int | timeframe, | ||
DateTime | start_time, | ||
int | count, | ||
out TMXRates[] | rates_array | ||
) |
Gets history data of TMXRates structure of a specified symbol-period in specified quantity into the rates_array array.
The elements ordering of the copied data is from present to the past, i.e., starting position of 0 means the current bar.
symbol | Symbol the data of which should be used to calculate indicator. NULL means the current symbol | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
timeframe | Timeframe. It can be any of following values:
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
start_time | The start time for the first element to copy | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
count | Data count to copy | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
rates_array | Array of TMXRates type |
If the whole interval of requested data is out of the available data on the server, the function returns -1.
If data outside TERMINAL_MAXBARS (maximal number of bars on the chart) is requested, the function will also return -1. If requested timeseries are not yet built or they need to be downloaded from the server, the function will immediately return -1. If you need to return value corresponding to the current uncompleted bar, you can use the first form of call specifying start_pos=0 and count=1. When requesting data by the start date and the number of required elements, only data whose date is less than (earlier) or
equal to the date specified will be returned. It means, the open time of any bar, for which value is returned (volume, spread,
value on the indicator buffer, prices Open, High, Low, Close or open time Time) is always less or equal to the specified one.