MT4 Strategy Tester vs. MT5 Strategy Tester

Enivid

Administrator
Staff member
Nov 30, 2008
18,530
1,355
144
Odesa
www.earnforex.com
I did not know exactly about it, saw that there is a script button but did not read much what can I do with it :)
maybe later I should try. Now mainly trading on tradingview.com paper trading because not being profitable and I like that platform because of lot of instruments and bigger fonts than metatrader.

Actually what I am doing is making code to write to csv the loss sizes because the losses by metatrader tester does not make sense and with incorrect results I cannot normally backtest my system. Its weird what I am doing, really unbelievable that platform with 20 years makes wrong calculations of lossess or we do not understand something :)
Why do you backtest with MT4? MT5 Strategy Tester is way superior to it.
 

Poker_player

Active Trader
Jul 26, 2017
23
3
29
24
Why do you backtest with MT4? MT5 Strategy Tester is way superior to it.
Really? I thought I will find most code examples on MT4 because not many people use MT5 as I understood.
Maybe I really should try and maybe there loss sizes will make sense. Thanks for idea.

https://www.mql5.com/en/forum/9949
But I see it is way slower. Maybe that might not be biggest issue, if other benefits outweigts, would need to leave computer over nigth. For example one comment:


I ran the same test on MT4 and MT5 this time in visual mode . . . it took some time to complete.



MT4 - 16 minutes

MT5 - 4 hrs 44 mins (terminated early, I couldn't wait any longer)

MT4 ST is at least 17 times faster than MT5 ST
Ok later I see they talk about visual mode, that is probably causing lag. And I see in MT4 can uncheck visual mode, so probably same in MT5 and might be faster then.
 
Last edited:

Poker_player

Active Trader
Jul 26, 2017
23
3
29
24
MT5 Strategy Tester can backtest on real ticks data. Also, I am not sure, but perhaps, this issue with incorrectly calculated profit/swaps is handled better in MT5 vs. MT4.
ok, we will see. Started coding in mql5 , slow process because lot of functions do not work as in mql4. Like in mql4 to get day:

Code:
int Day()

In mql5 according to migration tutorial:

Code:
int DayMQL4()
  {
   MqlDateTime tm;
   TimeCurrent(tm);
   return(tm.day);
  }

https://www.mql5.com/en/articles/81
 

Enivid

Administrator
Staff member
Nov 30, 2008
18,530
1,355
144
Odesa
www.earnforex.com
It's just a little it different approach to everything. A lot of stuff in MT5 is accessed via structures and classes. So, yes, you have to create an MqlDateTime structure to get various forms of date/time, but once you declared and initialized it, you can easily access all forms of date/time and you can also feed it any timestamp and be getting those day_of_week or whatever for that timestamp. Can be quite handy when you work with time a lot in your code, but I admit that it is less simple than it is in MT4.
 

Poker_player

Active Trader
Jul 26, 2017
23
3
29
24
Checked the calculated price on vs MT5 tester showing price. For some reason tester shows smaller loss than calculator shows.

1607798240281.png

1607798266601.png

1607798476428.jpeg

it should be 6.14+441.9 = 448.08 loss + some commission. But it shows 424.34.
 

Attachments

  • 1607798293819.png
    1607798293819.png
    315.1 KB · Views: 6
  • 👍
Reactions: Enivid

Enivid

Administrator
Staff member
Nov 30, 2008
18,530
1,355
144
Odesa
www.earnforex.com
Checked the calculated price on vs MT5 tester showing price. For some reason tester shows smaller loss than calculator shows.
That's a bug in PSC calculation when it attempts to calculate future rate adjustment for cases when Base currency = Account currency. I will work on fixing it. Thanks for reporting!
 
  • 👍
Reactions: Poker_player