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.
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.
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.