How to get historical tick data from MT5?

 

I need to know the latest 10000 tick Quotes,How to get?Use Mqlrates to receive it

All the functions in MT5 obtain the storage structure of K-line index

What I need is tick data

For example: 

 MqlRates     Tick[10000];

tick[0].open;//Latest opening price

tick[0].close;//Latest closing price

tick[500].open;//Closing price of 1000 ticks to the bottom

tick[1000].time//1000 ticks to the bottom

How to deal with it?