cant make backtest in MT5 platform

trying MT5 backtest by using imported 1M bars, everything seems to work, but due to the logging and market closed error, the backtest cant be done, because the logging everything slows donw and even if i turn off the logging the market closed error still occurs and backtest cant be done
Attachments
EU_H1_110113188_S_SC_CF_SQX.mq5
(224.45 KiB)
mt5.jpg
(584.36 KiB)
  • Votes +2
  • Project StrategyQuant X
  • Type Bug
  • Status Refused
  • Priority Normal

History

h
#1

hankeys

27.11.2020 22:42

Task created

h
#2

hankeys

29.11.2020 22:46
Voted for this task.
h
#3

hankeys

29.11.2020 22:48

Attachment Portfolio1.mq5 added

Portfolio1.mq5
(250.16 KiB)
another one - trying to backtest this merged portfolio in MQL5, but i am gettinc on tick critical error "divide by zero"


the error leads to this computation


   double PointValue = SymbolInfoDouble(correctedSymbol, SYMBOL_TRADE_TICK_VALUE) / SymbolInfoDouble(correctedSymbol, SYMBOL_TRADE_TICK_SIZE); 

TB
#4

Tomas Brynda

03.12.2020 10:51
It means that either you have chosen a non-existing symbol or the terminal returns 0 for the symbol's tick size - if this is the case I'm afraid there's nothing we can do
h
#5

hankeys

03.12.2020 11:10
there are 2 bugs in here, did you investigate both?


about the portfolio, where the problem with divide be zero, yes i have made this changes for these variables - so the user are not forced to put the exact subchart name from his broker and trading and backtesting should be run on the choosen market and TF. Exact the same i am doing with MQL4 code and there it works.


I am not a programmer, so maybe these changes on MQL5 doesnt work....


input string Subchart1Symbol = "NULL";

input int Subchart1Timeframe = NULL;


if i revert it back to


input string Subchart1Symbol = "EURUSD_M1_UTC2";

input int Subchart1Timeframe = 60;


...which are the "symbol" name which i imported from SQX to MT5, the problem is the same....zero divide error

TB
#6

Tomas Brynda

03.12.2020 11:59
Ok it looks like the ticksize is missing in custom symbols exported from SQ.


The market closed error is very difficult to handle in MT5. I have added new checks but had to removed it as it causes problems on some brokers

h
#7

hankeys

03.12.2020 12:05
but this not an explanation, that single strategy can be backtested - or better - the backtest will run, but get stuck because of the retries


but merged strategies dont work at all


and if i try to make a backtest on normal market from the broker, the error is the same...so there is no evidence that this error is due to the custom symbol

TB
#8

Tomas Brynda

03.12.2020 12:14
I am looking for some solution to the market closed problem, it has been reported multiple times, but in MT5 it's not so easy as in MT4.


The EA must be able to get the ticksize of the symbol. Otherwise it's impossible for it to work properly.

What broker do you use and on what exact symbols does the ticksize problem happen?

h
#9

hankeys

03.12.2020 12:18
testing on eurusd h1...broker darwinex
TB
#10

Tomas Brynda

03.12.2020 12:41

Attachment Vystrizek.png added

Vystrizek.png
(8.47 KiB)
I've created Darwinex-Demo account and backtested your strategy. The backtest performed just fine, no errors.

Take a look at my settings

h
#11

hankeys

03.12.2020 22:14

yes, it seems that in MT5 cant be used NULL as it was working in MT4


without them the backtest works

TB
#12

Tomas Brynda

07.12.2020 17:14

Status changed from New to Refused

Market closed error was happening because of invalid symbol name. Closing this task
h
#13

hankeys

07.12.2020 21:05
but the first single strategy - there was no problem with the symbol...backtest was running for example for 2 years and get stuck after only some time

Votes: +2

Drop files to upload

or

choose files

Max size: 5MB

Not allowed: exe, msi, application, reg, php, js, htaccess, htpasswd, gitignore

...
Wait please