Is it possible to use Strategy tester from python module for metatrder5 ?

 

Hi Team

Metatrader5 have integrated python, I can see trade functions can be used.

Is it possible to test  strategy tester from python ? 

The Fundamentals of Testing in MetaTrader 5
The Fundamentals of Testing in MetaTrader 5
  • www.mql5.com
What are the differences between the three modes of testing in MetaTrader 5, and what should be particularly looked for? How does the testing of an EA, trading simultaneously on multiple instruments, take place? When and how are the indicator values calculated during testing, and how are the events handled? How to synchronize the bars from different instruments during testing in an "open prices only" mode? This article aims to provide answers to these and many other questions.
 
jothimurugan92: Hi Team Metatrader5 have integrated python, I can see trade functions can be used. Is it run strategy tester from python module? 

The MetaTrader Strategy Tester is for testing MQL programs (Indicators and Expert Advisors).

 
Fernando Carreiro #:

The MetaTrader Strategy Tester is for testing MQL programs (Indicators and Expert Advisors).

I want anaylze multiple variables using spreadsheet then create signals send them to MT5 using python.

In order to test my strategy I want simulate them in Strategy Tester. How to implement my idea ?  

 
jothimurugan92 #: I want anaylze multiple variables using spreadsheet then create signals send them to MT5 using python. In order to test my strategy I want simulate them in Strategy Tester. How to implement my idea ?  

I have already answered. MetaTrader 5 Strategy Tester is for MQL5 programs, not for Python scripts.

To back-test Python you will either have to create your own back-testing environment or find and existing 3rd party solution.

 
Fernando Carreiro #:

I have already answered. MetaTrader 5 Strategy Tester is for MQL5 programs, not for Python scripts.

To back-test Python you will either have to create your own back-testing environment or find and existing 3rd party solution.

Please give me some suggestion based on your experience
 
jothimurugan92 #: Please give me some suggestion based on your experience

It's called "doing research". For example, doing a search — https://www.mql5.com/en/search#!keyword=Python%20backtest&module=mql5_module_forum

Alternatively, program in MQL5 instead of Python.
 
I think found something that may help  OpenTrading/mql4zmq: MQL4 bindings for ZeroMQ (github.com) .But its designed for mql4 not mql5.
GitHub - OpenTrading/mql4zmq: MQL4 bindings for ZeroMQ
GitHub - OpenTrading/mql4zmq: MQL4 bindings for ZeroMQ
  • OpenTrading
  • github.com
OTMql4Zmq - MQL4 bindings for http://zeromq.org, the high-speed messaging protocol for asynchronous communications between applications. We plan on upgrading it to ZeroMQ 4.x and have started that process, but for now the version 4.0.4 code is not completely working. We are integrating in the changes from...
 
Jothimurugan Muthusamy #: I think found something that may help  OpenTrading/mql4zmq: MQL4 bindings for ZeroMQ (github.com) .But its designed for mql4 not mql5.
That has nothing to do with back-testing python strategies. That is a "message queue" system.
 
In future Metaquotes integrate Message Broker will be helpful for sending data to other programs while testing in strategy tester and analyze them in other high-performance software, since they have blocked sockets in Tester Testing Trading Strategies - MQL5 programs - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5 to increase performance. Anyone interested in developing please ping me.
Documentation on MQL5: MQL5 programs / Testing Trading Strategies
Documentation on MQL5: MQL5 programs / Testing Trading Strategies
  • www.mql5.com
Testing Trading Strategies - MQL5 programs - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
 
Fernando Carreiro #:
That has nothing to do with back-testing python strategies. That is a "message queue" system.

It has something that may help....

 
Jothimurugan Muthusamy #:

It has something that may help....

from your problem statement you can't use the tester as Fernando has said already. The next best option I think would be to just fire your orders from python and test on a demo MT5 account. If you want to test the efficacy of your signals then use a python backtesting platform before you run on MT5 demo.