Download MetaTrader 5
MQL5 ReferenceCustom SymbolsCustomRatesDelete 

CustomRatesDelete

Deletes all bars from the price history of the custom symbol in the specified time interval.

int  CustomRatesDelete(
   const string     symbol,       // symbol name
   datetime         from,         // start date
   datetime         to,           // end date
   const MqlRates&  rates[]       // array for the data to be applied to a custom symbol
   );

Parameters

symbol

[in]  Custom symbol name.

from

[in]  Time of the first bar in the price history within the specified range to be removed.

to

[in]  Time of the last bar in the price history within the specified range to be removed.

rates[]

[in]   Array of the MqlRates type history data.

Return Value

Number of deleted bars or -1 in case of an error.

 

See also

CustomRatesReplace, CustomRatesUpdate, CopyRates