Get historical data from any stock

 

Hi guys, I'm new to this world of EA and automated trading.

I would like to know if MT5 makes it possible to get historical data from any stock.

I know that I can get historical data of cryptos using Binance API (as example)

Buy if I want to get historical data about a stock? Can i get it without an external API?


I'm from brazil and I'm using a brazilian broker.

NOTE: I'm using python to develop my backtest program.

Greetings all

Testing trading strategies on real ticks
Testing trading strategies on real ticks
  • www.mql5.com
The article provides the results of testing a simple trading strategy in three modes: "1 minute OHLC", "Every tick" and "Every tick based on real ticks" using actual historical data.
 
iagochoa :

Hi guys, I'm new to this world of EA and automated trading.

I would like to know if MT5 makes it possible to get historical data from any stock.

I know that I can get historical data of cryptos using Binance API (as example)

Buy if I want to get historical data about a stock? Can i get it without an external API?


I'm from brazil and I'm using a brazilian broker.

NOTE: I'm using python to develop my backtest program.

Greetings all

As soon as you have connected to the trading server (entered your login and password), your MetaTrader 5 has access to the entire history that is on the trading server. If you need to use history in your MQL5 programs - look aside

Documentation on MQL5: Timeseries and Indicators Access / CopyTicks
Documentation on MQL5: Timeseries and Indicators Access / CopyTicks
  • www.mql5.com
CopyTicks - Timeseries and Indicators Access - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
 
Thank you
Vladimir Karputov #:

As soon as you have connected to the trading server (entered your login and password), your MetaTrader 5 has access to the entire history that is on the trading server. If you need to use history in your MQL5 programs - look aside

Thank you Vladimir!
Reason: