Delete Data MetaTrader 5

To add comments, please log in or register
sadplanet
38
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.

amando
792
amando  
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

kypa
972
kypa  

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.

sadplanet
38
sadplanet  
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
kypa
972
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.

sadplanet
38
sadplanet  
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!
kypa
972
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

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
sadplanet
38
sadplanet  
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!
To add comments, please log in or register