Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 1045

 
artmedia70:


How are you going to stop the cycle?

Why stop it? On the computer, hold the button for 4 seconds and it's stopped...
 
AlexeyVik:
Why stop it? On a computer, you hold the button for 4 seconds and it's stopped...
You can also pour water on it...
 
Hello, could you please tell me which function can return a specific digit after the decimal point for fractional numbers, e.g. the price is 1.54321, I need the function to return the last digit, or any other decimal point?
 
Rogoza:
Hello, Could you please tell me what function can return a particular digit after the decimal point for a fractional number, eg the price is 1.54321, I need the function to return the last digit, or any other decimal point?

1. You can translate to a string, take a character by position number and translate back to a number.

2. Multiply by 10 to the required power, discard the fractional part and get the remainder of the division by 10

int result = int(1.54321 * 100000) % 10;
 
artmedia70:

Do OnTimer() and OnChartEvent() tell you anything?

And how are you going to stop the loop?

Not familiar with these functions... I'll read up on them.

The cycle is made for Expert Advisor not to depend on ticks. There is no need to stop it. If I want to stop the robot, I simply turn it off.

 

Good afternoon.

How to determine the number of elements in an array of timeseries, for example in iClose.

The iBars function returns the value 2048, i.e. it's not the total number of bars in the instrument for the given timeframe, but the bars that fit in the chart window...

Thank you.

 
AlexeyVik:

1. You can translate to a string, take a character by position number and translate back to a number.

2. Multiply by 10 to the required power, discard the fractional part and get the remainder of the division by 10

Thank you very much!
 

Hi all. I am optimising an EA using the built-in strategy tester in MT4 with the "genetic algorithm" function. 1280 passes in 36 hours. I searched on the Internet and came across an article that describes how to save all computed passes during optimization at normal standstill in a cache file. But I was worried that after resuming optimization, judging by the status bar, the optimization does not continue from the run where optimization was stopped as described in the article. In total I have run all 30 hours and the cache file is growing in size, but every time I start optimization I see the same 36-40 hours and 1/1280 pass state.

At the same time there is a record in logs.

2016.05.16 11:55:47.103 Tester: cache file "C:\Users\*****\AppData\Roaming\MetaQuotes\Terminal\1FC724C8C211BFE8ECF8B599A855301E\tester\caches\Ilan Dynamic New.EURUSD15.0" found and can be used for further optimization

Also from time to time appears in the logs next entry, which means that in the cache match was found, which will be taken into account in the results. But such cases are very few, in spite of the fact that in a cache should be already all possible passes are written.

2016.05.17 09:21:18.547 Optimization cacher: pass 11450 skipped due test limit 'maximal drawdown %=50' reached with inputs: risk=0.55; MaxTrades=15; LotExponent=1.55; LockLotExponent=1.6; 

Question: How can I get optimization to continue from the last stop (pass) after a routine stop and restart? Of course, I didn't change the optimization settings or testing period in any way. I pressed "Stop"; the cache was overwritten; closed the terminal; shut down the computer; restarted it; started the terminal; started the last optimization settings (which are automatically saved) using "Start" button.

Quote from the article:

При генетической оптимизации промежуточные результаты сохраняются в кэше после расчета каждого поколения (файл папка_данных_платформы/tester/cache/*.gen). Таким образом, процесс генетической оптимизации можно прерывать в любой момент. Даже если процесс генетической оптимизации будет прерван из-за внешних причин (например, отключения электричества), оптимизация будет автоматически продолжена с последнего рассчитанного поколения при последующем запуске. Кэш генетической оптимизации хранится до изменения настроек оптимизации или до завершения процесса оптимизации.

When optimization is stopped normally (with the "Stop" button), all previously calculated passes are saved. When optimisation is resumed, the process will continue from where it was stopped.

Source: https://www.metatrader5.com/ru/terminal/help/strategy_optimization

 

how to moveFileMove() from the folder Alpari Limited MT4\tester\files to Alpari Limited MT4\MQL4\Files\ ??????????? is it possible at all????????

or how do I read the file from Alpari Limited MT4\tester\files ?????????? - it does not work because it wants to eat from Alpari Limited MT4\MQL4\Files\.

 
mario_SC--:

how to moveFileMove() from the folder Alpari Limited MT4\tester\files to Alpari Limited MT4\MQL4\Files\ ??????????? is it possible at all????????

or how do I read the file from Alpari Limited MT4\tester\files ?????????? - it does not work because it wants to eat from Alpari Limited MT4\MQL4\Files\.

Doesn't the FILE_COMMON flag work in the tester?