Discussion of article "LifeHack for traders: Fast food made of indicators" - page 6

 
Vladimir Karputov:

MACD Sample One value at a time.mq5 and MACD Sample 4 to 5 MQL4 style.mq5 give different profits with the same values of input parameters.

Moreover, one is written through OOP, the other - procedural style. Therefore, the performance comparisons given in the article raise questions.

 
Renat Fatkhullin:

There is no automatic targeting of indicator handles during MQL5 application operation. Indicator handles are automatically released only after the MQL5 programme is finished within the framework of "cleaning up after a sloppy programmer". We should explicitly write vornings in such cases to raise the quality of programmes.

Therefore, the one who creates a bunch of indicators and does not control their removal creates big problems. Both for his programme and for the whole terminal.

I repeat once again - the methods in the article are categorically harmful and incorrect.

You are one of the few who know what goes on behind the scenes of MetaTrader 5. Please explain what happens when iCustom(....) is accessed multiple times. What kind of overhead should we expect in the end and what does it consist of? And, if the handle is memorised, why does repeated invocation of the iMACD(....) type kill performance?

 
fxsaber:

MACD Sample One value at a time.mq5 and MACD Sample 4 to 5 MQL4 style.mq5 give different profits with the same values of input parameters.

Moreover, one is written via OOP, the other - procedural style. Therefore, the performance comparisons given in the article raise questions.


No. n/aExpert AdvisorEach tick based on real ticksAll ticksOHLC


Test timeTradesTradesTest timeTradesTradesTest timeTradesTrades
1MACD Sample.mq50:01:19.4851222440:00:53.7501222440:00:03.735119238
2MACD Sample One value at a time.mq50:01:20.3441222440:00:56.2971222440:00:03.687119238
3MACD Sample 4 to 5 MQL4 style.mq50:02:37.4221222440:01:52.1711222440:00:06.312119238

All three Expert Advisors showed the same charts in the "All ticks" mode:

MACD Sample

 
Vladimir Karputov:

All three Expert Advisors showed the same charts in the "All ticks" mode:

Compare Profits (numbers), not charts.

 
fxsaber:

Moreover, one is written via OOP, the other is procedural style. That's why the performance comparisons given in the article raise questions.

The Expert Advisors must be unambiguously identical and differ only by the indicator call. It is categorically impossible to compare two different codes even though they give the same result in the tester.
 
fxsaber:

Compare profiles (numbers), not charts.


I have long ago compared figures and the number of deals and trades. If you write, then give more precise data: where and what you tested. Final logs.

 
Vladimir Karputov:

I have long ago compared figures and the number of deals and trades. If you write, then give more precise data: where and what you tested. Final logs.

EURUSD,M1 (MetaQuotes-Demo): generating based on real ticks
EURUSD,M1: testing of Experts\Fast food\MACD Sample 4 to 5 MQL4 style.ex5 from 2017.09.01 00:00 to 2018.01.26 00:00 started with inputs:
  TakeProfit=50
  Lots=0.1
  TrailingStop=30
  MACDOpenLevel=3
  MACDCloseLevel=2
  MATrendPeriod=26
...
final balance 10000144.09 EUR
EURUSD,M1: 9753093 ticks, 147480 bars generated. Test passed in 0:00:16.598 (including ticks preprocessing 0:00:01.373).


EURUSD,M1 (MetaQuotes-Demo): generating based on real ticks
EURUSD,M1: testing of Experts\Fast food\MACD Sample One value at a time.ex5 from 2017.09.01 00:00 to 2018.01.26 00:00 started with inputs:
  InpLots=0.1
  InpTakeProfit=50
  InpTrailingStop=30
  InpMACDOpenLevel=3
  InpMACDCloseLevel=2
  InpMATrendPeriod=26
...
final balance 10000140.65 EUR
EURUSD,M1: 9753093 ticks, 147480 bars generated. Environment synchronized in 0:00:00.047. Test passed in 0:00:08.939 (including ticks preprocessing 0:00:01.357).
 
fxsaber:



Okay, I will show the written for the third time:

All three EAs showed the same charts in the "All ticks" mode:

 
Vladimir Karputov:

Okay, I will show the written for the third time:

Expert Advisors with the same trading logic in any testing mode should show the same result. In this case, this is not observed.

Well, in the mentioned "All ticks" mode with the same settings the results are different.
 
fxsaber:

Expert Advisors with the same trading logic in any testing mode should show the same result. In this case, this is not observed.

Well, in the mentioned mode "All ticks" with the same settings the results are different.

But mine are the same. What to do? Flood 10 pages?