Share on facebook
Share on twitter

Accessing OHLCV and Bid/Ask Prices | Migrating from MQL4 to MQL5 for Algorithmic Traders

1 490 views | 17 Apr. 2019

This tutorial shows

This tutorial shows algorithmic traders using MetaTrader 4 (MQL4), how to retrieve current BID / ASK and historical OHLCV prices in MQL5 (MetaTrader 5). Brought to you by Darwinex: https://www.darwinex.com/?utm_source=youtube&utm_medium=video-description-above-fold&utm_content=mql4-mql5-retrieving-bid-ask-ohlcv-prices

Risk Disclosure:


Series: Migrating from MQL4 to MQL5: Guidance for Algorithmic Traders

MQL4 makes these accessible via pre-defined variables Bid and Ask, and arrays Open, High, Low, Close, Time and Volume.

In MQL5, the same prices can be retrieved in 3 ways, via:


1) iTime, iOpen, iHigh, iLow, iClose and iTickVolume

2) CopyTime, CopyOpen, CopyHigh, CopyLow, CopyClose, CopyTickVolume functions

3) CopyRates, using the MqlRates struct

For further information on Time Series access in MQL5, please visit:


All content is specifically geared towards algorithmic traders currently using MQL4, with the aim of making a case for transition from MQL4 to MQL5, and providing the knowledge needed to ensure it is a smooth, educated endeavour.


Are you an algorithmic trader?

We'd love to have your strategy listed on our Exchange, enabling you to earn performance fees on investor profits!

More details here:


2.0M in performance fees paid to date:


Topics: #algorithmictrading #mql4 #mql5 #metatrader4 #metatrader5 #darwinex #mt4 #mt5 #metatrader

Milko Vivaldi

Best teacher, thanks from Italy!

HRH Stephen

Are there any advantages in using the various options that produce the same results? iClose vs copyrates for example.

Milko Vivaldi

Why you put always _ ahead variables? Do you like it...?!

Iain Bell

Is that dark style in your IDE available as a stylesheet or somesuch ??


Share on facebook
Share on twitter

Use =CS.OHLCV to find the historical price for Bitcoin or any BTC pair in Cryptosheets

52 views | 29 May. 2020

See more

See more here:




Get Cryptosheets for Excel:


Get Cryptosheets for Googlesheets:


Follow us on Twitter:


Follow us on Medium:



Share on facebook
Share on twitter

CCXT Pro OHLCV Limit showcase

113 views | 17 Mar. 2020