Delete Data MetaTrader 5

 

Hi there

Is it possible to delete historical data in MetaTrader 5 so one can create a custom session like in MetaTrader 4? I did try a synthetic symbol but that didn't work.

 
sadplanet:

Hi there

Is it possible to delete historical data in MetaTrader 5 so one can create a custom session like in MetaTrader 4? I did try a synthetic symbol but that didn't work.

you can create your own chat in MT5, based on whatever you want, bcs MT5 is Tick based instead of time based from MT4

 

I have no idea what custom session in MT4 is, but MT5's history is in Data Folder/bases/<server>/history (in Terminal menu File/Open Data Folder), tick history is in Data Folder/bases/<server>/ticks.

Legend says MT5 makes all timeframes from 1 minute, so if you delete bigger timeframes without deleting 1 minute you won't get history any different.

 
Thanks for replying. When using MetaTrader 4 you can delete historical data in the "History Center" under the tools menu. I'm trying to find out if that can be done when using MetaTrader 5. When you open the data folder in MetaTrader 5 you only get .hcc files which I can't open and edit. I attached an image from a MetaTrader 4 chart for clarification.
Files:
MT4.PNG  98 kb
 

I doubt we could manipulate history data like that in MT5.

A way to do this would be copying just the rates we want into a custom symbol. If no rates exist for a particular time period MT5 shouldn't build bars in it.

 
kypa:

I doubt we could manipulate history data like that in MT5.

A way to do this would be copying just the rates we want into a custom symbol. If no rates exist for a particular time period MT5 shouldn't build bars in it.

I'll have a look at that. Thanks for your help so far!
 

You will probably need to use CopyRates(from time1 to time2) into one MqlRates array then ArrayCopy to another array as CopyRates can't offset every next copying.

https://www.mql5.com/en/docs/function_indices

https://www.mql5.com/en/docs/customsymbols

Documentation on MQL5: List of MQL5 Functions
Documentation on MQL5: List of MQL5 Functions
  • www.mql5.com
Reads from the file of the CSV type a string of one of the formats: "YYYY.MM.DD HH:MM:SS", "YYYY.MM.DD" or "HH:MM:SS" - and converts it into a datetime value
 
kypa:

You will probably need to use CopyRates(from time1 to time2) into one MqlRates array then ArrayCopy to another array as CopyRates can't offset every next copying.

https://www.mql5.com/en/docs/function_indices

https://www.mql5.com/en/docs/customsymbols

You're the best! The world is a better place with people like you!
Reason: