
A set of functions for getting price data within a currency pair/ rebateforexbroker If the requested data (currency pair name/period is different from the rebateforexfee chart) comes from another chart, it may be the case that the corresponding chart is not opened within the client and the data needs to be downloaded from the server side. UPDATED (4066 ForexRapidRebate the requested historical data is being updated) will be placed in the last_error variable and the update will have to be requested again (see the ArrayCopySeries() example). In any case, the total number of cashback forexs in a session is accurately simulated. iBars()– Get the number of bars. iBarShift()– Search for the specified bar. iClose()– Get the closing price of the bar. iHigh()– Get the highest price of the bar. iHighest()– get the bars highest value offset iLow()– get the bars lowest price iLowest()– get the bars lowest value offset iOpen()– get the bars open price iTime()– get the bars open Forex Rapid Rebate iVolume()– get the Column volume iBars()– get the number of bars intiBars(stringsymbol,inttimeframe) returns the number of bars (K lines) in the specified chart For the current chart, information on the number of bars is stored in the predefined variable Bars Parameters:symbol - the currency for which the indicator data is to be calculated pair name NULL means the current currency pair timeframe - time period can time period enumerate any value 0 means the time period of the current chart Example: Print(EURUSD in the rebateforex time period the number of bars:,iBars(EUROUSD,PERIOD_H1));iBarShift()– search for the specified bar intiBarShift(stringsymbol,inttimeframe,datetimetime,voidexact) according to the opening time search bar (K-line) This function returns the bar with the specified opening time if the bar with the specified opening time is lost, the function will return -1 or the nearest bar, which depends on the care exact parameters set parameters: symbol - to calculate the indicator data currency pair name NULL that the current currency pair timeframe - time period can be time period enumerated any value 0 that the current chart time period time - bar (K-line) opening time exact - not found bar return mode false - return to the nearest bar, true -return-1 example:datetimesome_time=D2004.03.2112:00;intshift=iBarShift(EUROUSD,PERIOD_M1,some_time);Print(bar with open time,TimeToStr(some_time), is,shift);iClose()– get the closing price of the bar doubleiClose(stringsymbol,inttimeframe,intshift) returns the closing price of the specified currency pair bar (K-line) with time period and offset if the local history table is empty (historical data not loaded), the function returns 0 For the current chart, the information about the closing price is stored in the predefined array Close[] Parameters: symbol - the name of the currency pair for which the indicator data is to be calculated NULL means the current currency pair timeframe - time period can be time period enumerated any value 0 means the time period of the current chart shift - the index of the value obtained from the indicator buffer (relative to the current bar moved forward offset by a certain number of cycles) Example: Print(for USDCHFH1 current bar:,iTime(USDCHF,PERIOD_H1,i),,,iOpen(USDCHF,PERIOD_H1,i),,,iHigh(USDCHF,PERIOD_H1,i),,,iLow(USDCHF ,PERIOD_H1,i),,,iClose(USDCHF,PERIOD_H1,i),,,iVolume(USDCHF,PERIOD_H1,i));iHigh()–Get the highest price of the column doubleiHigh(stringsymbol, inttimeframe,intshift) returns the highest price of the specified currency pair bar (K-line) with time period and offset If the local history table is empty (historical data not loaded), the function returns 0 For the current chart, the information on the most intraday price is stored in the predefined array High[] Parameters: symbol - the name of the currency pair to calculate the indicator data NULL means current currency pair timeframe - time period can be time period enumerated any value 0 means the current chart time period shift - from the indicator buffer to get the value of the index (relative to the current column to move forward a certain number of cycles offset) Example: Print (for USDCHFH1 current column:,,iTime(USDCHF,PERIOD_H1, i),,,iOpen(USDCHF,PERIOD_H1,i),,,iHigh(USDCHF,PERIOD_H1,i),,,iLow(USDCHF,PERIOD_H1,i),,,iClose(USDCHF,PERIOD_H1,i),,,iVolume( USDCHF,PERIOD_H1,i)); iHighest() – column highest value offset intiHighest(stringsymbol,inttimeframe,inttype,voidcount,voidstart) return according to type within a specified time period maximum value of the offset parameters: symbol - to calculate the indicator data currency pair name NULL means the current currency pair timeframe - time period can time period enumerated arbitrary value 0 means the current chart time period type - the identifier of the sequence array it can be any value of the sequence data identifier enumeration count - the number of periods to be calculated (along the beginning of the bar to after the direction of the column) start-start column, relative to the current column, the beginning of the collection of data column example: doubleval;// in the range of 20 consecutive columns to calculate the maximum // in the current chart from the 4th to the 23rd index val = High[iHighest(NULL,0,MODE_HIGH,20,4)]; iLow()– get the lowest price of the bar doubleiLow(stringsymbol,inttimeframe,intshift) returns the lowest price of the specified currency pair bar (K-line) with time period and offset If the local history table is empty (historical data is not loaded), the function returns 0 For the current chart, the information on the most intraday price Stored in a predefined array Low[] parameters: symbol - the name of the currency pair to calculate the indicator data NULL means the current currency pair timeframe - time period can be time period enumerated any value 0 means the current chart time period shift - the index of the value obtained from the indicator buffer (offset relative to the current bar moved forward a certain number of cycles) Example: Print(for USDCHFH1 current bar:,iTime(USDCHF,PERIOD_H1,i),,,iOpen(USDCHF,PERIOD_H1,i),,,iHigh(USDCHF,PERIOD_H1,i),,,iLow(USDCHF,PERIOD_H1,i), ,,iClose(USDCHF,PERIOD_H1,i),,,iVolume(USDCHF,PERIOD_H1,i)); iLowest() – column lowest value offset intiLowest(stringsymbol,inttimeframe,inttype, voidcount,voidstart) returns the offset of the lowest value in a specified time period according to the type parameters:symbol - to calculate the indicator data currency pair name NULL means the current currency pair timeframe - time period can be time period enumerated any value 0 means the current chart time period type - identifier of the series array it can be any value of the series data identifier enumeration count-the number of periods to be calculated (along the beginning bar to the direction of the latter bar) start-start bar, relative to the current bar, start collecting data for the bar example: doubleval;// calculate the minimum value within the range of 20 consecutive bars // index from the 4th to the 23rd on the current chart val=Low [iLowest(NULL,0,MODE_LOW,20,4)];iOpen()–Get the bar opening price doubleiOpen(stringsymbol,inttimeframe,intshift) returns the opening price of the specified currency pair bar (K-line) with time period and offset if the local history table is empty (historical data is not loaded), the function returns 0 for the current chart, the most information about the price is stored in the predefined array Open[] parameters: symbol - to calculate the indicator data the name of the currency pair NULL means the current currency pair timeframe - time period can be time period enumerated any value 0 means the current chart time period shift - from the indicator index of the value obtained from the buffer (offset relative to the current bar moved forward a certain number of cycles) Example:Print(for USDCHFH1 current bar:,iTime(USDCHF,PERIOD_H1,i),,,iOpen(USDCHF,PERIOD_H1,i),,,iHigh(USDCHF, PERIOD_H1,i),,,iLow(USDCHF,PERIOD_H1,i),,,iClose(USDCHF,PERIOD_H1,i),,,iVolume(USDCHF,PERIOD_H1,i)); iTime() – Get the bar opening time datetimeiTime(stringsymbol,inttimeframe,intshift) returns the opening time of the specified currency pair bar (K-line) with time period and offset If the local history table is empty (historical data is not loaded), the function returns 0 For the current chart, the information about the most intraday price is stored in the predefined array Time[] Parameters :symbol - the name of the currency pair for which the indicator data is to be calculated NULL means the current currency pair timeframe - time period can be time period enumerated any value 0 means the time period of the current chart shift - the index of the value obtained from the indicator buffer (offset relative to the current bar moved forward a certain number of cycles) Example:Print(for USDCHFH1 Current bar:,iTime(USDCHF,PERIOD_H1,i),,,iOpen(USDCHF,PERIOD_H1,i),,,iHigh(USDCHF,PERIOD_H1,i),,,iLow(USDCHF,PERIOD_H1,i),,,iClose(USDCHF, PERIOD_H1,i),,,iVolume(USDCHF,PERIOD_H1,i)); iVolume()– Get the bar volume datetimeiVolume(stringsymbol,inttimeframe,intshift) returns the bar volume with time period and offset of the specified currency pair bar (K line) volume if the local history table is empty (historical data not loaded), the function returns 0 for the current chart, the most price information is stored in the predefined array Volume [] Note: the volume is not really volume, it is an estimate of the value of the number of tick price changes under the K line, the meaning behind it is that if the tick price change very quickly, that means the larger the volume; tick price change more slowly, that means the smaller the volume parameters: symbol - to calculate the indicator data the name of the currency pair NULL means the current currency pair timeframe - time period can time period enumerate any value 0 means the current chart time period shift - from the indicator buffer to get the value of the index (relative to the current bar forward move a certain number of cycles offset) Example: Print(for USDCHFH1 current bar:,iTime(USDCHF,PERIOD_H1,i),,,iOpen(USDCHF,PERIOD_H1,i),,,iHigh(USDCHF,PERIOD_H1,i),,,iLow( USDCHF,PERIOD_H1,i),,,iClose(USDCHF,PERIOD_H1,i),,,iVolume(USDCHF,PERIOD_H1,i));