I use MT5 Cloud Servers to optimize my ea, I prefer using "Every Tick" on Genetic algorithms. At times it takes 90 min to finish 3,000 iterations. What is the best time of the day/night to optimize?

 

I use MT5 Cloud Servers to optimize my ea, I prefer using "Every Tick" on Genetic algorithms. At times it takes 90 min to finish 3,000 iterations. What is the best time of the day/night to optimize to finish in at least half of the time? I am in Pacific time zone California, USA? 

Please do not answer with any other suggestions except what would be a good time of the day/night to do the optimization faster. 

Genetic Algorithms - It's Easy!
Genetic Algorithms - It's Easy!
  • www.mql5.com
In this article the author talks about evolutionary calculations with the use of a personally developed genetic algorithm. He demonstrates the functioning of the algorithm, using examples, and provides practical recommendations for its usage.
 
driven: I use MT5 Cloud Servers to optimize my ea, I prefer using "Every Tick" on Genetic algorithms. At times it takes 90 min to finish 3,000 iterations. What is the best time of the day/night to optimize to finish in at least half of the time? I am in Pacific time zone California, USA? 

3000 iterations in 90 minutes seems like your code is extremely inefficient.

I think you seriously need to improve your EA's code.

EDIT: Are you absolutely sure it is using the "cloud" and not just running on your computer only?

I ask because it is just absurdly slow, so if it is indeed running on the "cloud", then there is something definitely wrong in your code.

 
Fernando Carreiro #:

3000 iterations in 90 minutes seems like your code is extremely inefficient.

I think you seriously need to improve your EA's code.

It is extremely inefficient on "Every Tick" for 3,000 iterations with 7 parameter with steps 2-5 for the length time of 2 weeks and on 15 Min TF? 

What would be the expected efficiency optimization time wise in my situation? I will stop manually at 3,000 iterations. 


    

 
driven #: It is extremely inefficient on "Every Tick" for 3,000 iterations with 7 parameter with steps 2-5? What would be the expected efficiency optimization time wise in my situation? 

For my own EAs, being tested over a full year of real tick data, 3000 passes roughly takes 1 to 2 hours on my own PC using only 4 threads out of 8 total, and not using "cloud" at all.

My setup is an Intel Core i7-4790T @ 2.70GHz, 16GB RAM, 1TB SSD (Windows 10 Pro 64-bit).

If I were to run it on the cloud it would be under a minute.

As I reference point, please tell us how long it takes for a single back test to run on your computer—that is a single run, not optimisation, using real tick data.

 
Fernando Carreiro #:

For my own EAs, being tested over a full year of real tick data, 3000 passes roughly takes 1 to 2 hours on my own PC using only 4 threads out of 8 total, and not using "cloud" at all.

My setup is an Intel Core i7-4790T @ 2.70GHz, 16GB RAM, 1TB SSD (Windows 10 Pro 64-bit).

If I were to run it on the cloud it would be under a minute.

As I reference point, please tell us how long it takes for a single back test to run on your computer—that is a single run, not optimisation, using real tick datThank you. a.

Thank you, I will respond, once I finish optimization.  

 
driven #: It is extremely inefficient on "Every Tick" for 3,000 iterations with 7 parameter with steps 2-5 for the length time of 2 weeks and on 15 Min TF?  What would be the expected efficiency optimization time wise in my situation? I will stop manually at 3,000 iterations.     

Also, as I have stated before, you have too many steps defined. You need to narrow it down much more, or else the "genetic" algorithm has to keep waiting for updates from the various "cloud" points, in order to make a decision and proceed to the next round.


 

It takes backtesting 3 minutes and 46 seconds to do it on "Every Tick7 parameters with steps 2-5 for the length time of 2 weeks and on 15 Min TF. 

It takes 13 minutes and 51 seconds on "Real Tick". I use "Every Tick" only.   

Is it too long? Your thoughts? 

 

 
driven #: It is extremely inefficient on "Every Tick" for 3,000 iterations with 7 parameter with steps 2-5 for the length time of 2 weeks and on 15 Min TF?
  1. EAs : Don't do per tick what you can do per bar, or on open.
    If you are waiting for a level, don't reevaluate, wait until price reaches it (or a new bar starts, and you recalculate.)
    If you are waiting for an order to close, only look when OrdersTotal (or MT5 equivalent) has changed.
              How to get backtesting faster ? - MT4 - MQL4 programming forum (2017)

  2. Indicators: Code it properly so it only recomputes bar zero (after the initial run).
              How to do your lookbacks correctly. (2016)
              3 Methods of Indicators Acceleration by the Example of the Linear Regression - MQL5 Articles. (2011)
    Or, reduce Tools → Options (control+O) → Charts → Max bars in chart to something reasonable (like 1K.)

 
driven #: It takes backtesting 3 minutes and 46 seconds to do it on "Every Tick7 parameters with steps 2-5 for the length time of 2 weeks and on 15 Min TF. Is it too long? Your thoughts? 
Please tell us how long it takes to do a single back test, not an optimisation.
 
Fernando Carreiro #:
Please tell us how long it takes to do a single back test, not an optimisation.

It takes backtesting 3 minutes and 46 seconds to do it on "Every Tick" for the lenght of 2 weeks on 15 Min TF

It takes 13 minutes and 51 seconds on "Real Tick". I only use "Every Tick"or 1 Min OHLC.

It takes 10 seconds to do it on 1 min OHLC 

Your thoughts?

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.
 
driven #:

It takes backtesting 3 minutes and 46 seconds to do it on "Every Tick" for the lenght of 2 weeks on 15 Min TF

It takes 13 minutes and 51 seconds on "Real Tick". I only use "Every Tick"or 1 Min OHLC.

It takes 10 seconds to do it on 1 min OHLC 

Your thoughts?

That is WAAAAAY too long!

The longest I have ever had, was 2-3 minutes for 1 year of real tick data trading 5 symbols simultaneously (multi-currency EA).

What are your hardware specifications?

If they are similar to the ones I specified for my computer, then your code greatly needs to be revised and refactored.

Reason: