Multicurrency expert test results - page 6

 
tol64:

Why are you picking on that second source?)

If I start to answer on the merits, the response will be either something about"separately torn out phrases" or"I'm not the kind of person who thinks they're always right about everything". That's already clear.

About the ping-pong thing, it's a bit of a strange position to take. You are interested in a topic, you get answers and leading questions, and you either start challenging them or brushing them off. Do you or who needs the topic in the first place? I personally do not need these results and the outcome of your choice is of little interest to me. The topic itself seemed worthy of attention, but the polemical zeal of the author creates doubts in the expediency of its maintenance.

 
marketeer:

Why would it be? You have OnTimer as the third number there. You have already been quoted on this subject: You just need to implement a method that will correctly perform the test. There is one. This is the OnTimer () function with a minimum interval. So you must have something else in mind.

Before that you wrote that:

But it's not the same thing:
Actually, you are trying to "catch" the moment of new bars ticking on all symbols and it's obvious that the best way to do it is to use the OnTick event.


The thing is, I'm not trying to "catch" ticks in OnTimer(). In OnTimer() the check for a new bar is performed for each symbol separately. This check is performed at set interval in timer (in seconds).

Such an event as a tick is received in the OnTick() function and in the scheme proposed by Konstantin Gruzdev, i.e. in the OnChartEvent() function. In OnChartEvent() we can trace any event, including the formation of a new bar on any timeframe.

There is no problem with the timer. Now I test the multi-currency EA in the following way

1. I optimize parameters for each symbol separately, attaching the EA to the symbol whose parameters are being optimized. The optimization process is done using the OnTick() function. At the time of optimization of parameters for one symbol, all other symbols are disabled, i.e. they do not participate in testing and trades are performed only for the symbol, whose parameters are optimized.

2. After optimization of parameters for all symbols, we need to test all symbols at once. I move the code to the OnTimer() function (for now), enable the timer for preliminary testing (60 seconds) and analyze the obtained result. If I am satisfied, I tune up the money management system and other subsystems. Then I switch the final testing (timer 10 seconds) and receive, in my opinion, the most accurate result. My view and conclusions are based on the results of tests of all methods and comparison of these results with each other.

marketeer:
If it's important to you, I would still recommend checking with the developers what is the analogue of the fxt-file in Five. I've already written that different tick bases are likely to be generated for different tests.

Now that's an interesting assumption. It may even be the case. A reply from the developers would therefore be welcome.

 
There are no fxt files in mt5. Now ticks are not written to a file, but modelled from the minute history on the fly.

It turns out that generating ticks on the fly is faster than reading them from disk.
Документация по MQL5: Файловые операции / FileWrite
Документация по MQL5: Файловые операции / FileWrite
  • www.mql5.com
Файловые операции / FileWrite - Документация по MQL5
 
Renat:
There are no fxt files in mt5. Now ticks are not written to a file, but modelled from the minute history on the fly.

Turns out that generating ticks on the fly is faster than reading them from disk.
Hello Renat. Thank you for your reply. This is great news.
 
tol64:
Hello Renat. Thank you for your reply. This is great news.
I don't see anything great, it turns out that in mt5 you cannot test on real ticks
 
Loky:
I don't see anything great, it turns out that in mt5 you can't test on real ticks
Would you like to be able to collect your own real tickbase or take it from somewhere and test on it or something?
 
Yedelkin:

If I start to answer on the merits, the response will either be something along the lines of"separately excerpted phrases" or"I am not the kind of person who thinks they are always right about everything". That's already clear.

No. It seems that you still do not understand anything. And now I will explain it to you for the fourth time. Let's get our dialogue back on track.

It all started from this moment:

Yedelkin:
Pay attention to the part of the code:

int OnInit()
{
if(iCustom("EURUSD",PERIOD_D1,"Spy Control panel MCM",ChartID(),0,CHARTEVENT_TICK) == INVALID_HANDLE)
   { Print("Ошибка установки шпиона на EURUSD"); return(true);}
   
if(iCustom("GBPUSD",PERIOD_D1,"Spy Control panel MCM",ChartID(),1,CHARTEVENT_TICK) == INVALID_HANDLE)
   { Print("Ошибка установки шпиона на GBPUSD"); return(true);}
}

Here you can see that you "hinge" a certain "Spy Control panel MCM" on two different characters. So you have different symbols as signal sources. But you claim that "we trade on EURUSD", i.e. the signal source is one and the same symbol. Let's decide.

To that I have answered you:

tol64:

Oh, this is getting closer. It seems that one variant has appeared, where I am mistaken)). I will think about it for a while and I will write about it in details...

Thought. Answer:

tol64:

It only trades on EURUSD.

In my tests I consider the scheme by Konstantin Gruzdev - Implementation of the Multicurrency Mode in MetaTrader 5. ))) Everything is defined. The attached files contain the Spy Control panel MCM indicator and exSpy Control panel MCM Expert Advisor. By installing the Expert Advisor on a chart, you can see how it works. The log clearly shows the specified events received by the Expert Advisor from different symbols. Everything is clear, nothing is mixed.

I have now tried to specify in OnChartEvent() the symbol from which the ID is received, but this has not changed the results. I removed the second character from OnInit() to eliminate any possibility of receiving the wrong events. The test was now performed using this variant:

...

code

...

pictures

...

The results do not match. There is no second symbol anymore, the signals come only from EURUSD. But this unfortunately has not solved the problem.

The key point was:"There is no second symbol anymore, signals come only from EUR USD.But that unfortunately didn't solve the problem."


You see? Removing the second source didn't solve the problem. The situation was simplified and you could have left the second source, but you continued to cite the original example instead of trying to solve the following question. Why is it that having only one symbol (single source) but trading (in test mode) from another symbol, we get non-identical variants?

Here is the post where you expressed this:

Yedelkin:
Let's start with the correct wording. In the initial example, you would have liked "trade on EURUSD". In fact, user events were coming from two symbols, and in the event handler TradeSignalCounter()+TradePerformer() were called when events from any of these two symbols were received. We can assume that the event queue was always full.

Now you have removed one of the signal sources but entered the check "if(sparam == Symbol_01)" in the event handler for some reason. But the next question is different. Judging by the code, Lizar's scheme is used in "All ticks" mode and functions TradeSignalCounter()+TradePerformer() are called at every tick from the signal source (EURUSD). Interesting has already hinted on possible overflow of the event queue. I'm wondering, what instrument is used as Symbol_01 parameter of these two functions and whether you tried to change periodicity of events in Lizar's scheme.

I' ve explained it to you a second time (you call it whisking away for some reason):

tol64:

Yes, that's what I wanted to do. After all, every action we take is triggered by our desire. In this case, I got exactly what I wanted. That is, we traded only on EURUSD, because the TradePerformer() function checks if it is allowed to trade for each symbol in the array of symbols. This option is located in external variables and at that time trading using GBPUSD symbol was prohibited. User events came from two symbols, but in the event handler, again, the TradePerformer() function only allowed trading on the EURUSD symbol. The TradePerformer() function also contains a function that determines whether a new bar has occurred on a particular symbol, in this case EURUSD. Your assumption that the event queue has always been full is correct, but in this case everything has been processed separately and a one tick late is not significant when testing on daily bars.

Removing one signal source, the one that should not be involved in the testing, only confirmed that everything had been done correctly before. The check "if(sparam == Symbol_01)" remained from when I checked the results without deleting a signal source that should not be tested, but from which it should be tested. This check turned out to be actually even superfluous. The results did not change. EURUSD symbol is used as Symbol_01 parameter. I tried to change the frequency of events but it didn't change anything. More accurately, I can say that the all ticks mode is the most accurate.

Key point:"This test actually turned out to be even superfluous. The results didn't change."
This is the second time you've "failed to notice" that the problem is not what you point out, and this is the second time I've answered you the same thing, but even more explicitly.

You continued:

Yedelkin:
"...everything was done right before" - this is from the category of complacency. It was wrong to begin with. Apparently, you don't give importance to such a phenomenon as "event queue overflow". Particularly when it comes to post-itic transmission of events. Have a look at the reference materials and forum on the subject. The key word is "queue".

Because of the fact that functions TradeSignalCounter()+TradePerformer() process events from only one signal source, the state of the queue and its possible overflow has not changed in any way. In other words, the "prohibition of processing events by GBRUSD symbol" didn't remove the appropriate events from the queue at all. For the third time, I'm pointing out the problem: "A possible overflow in the queue of events was already hinted at" :) If you believe that it is only about "one tick late", what is the basis for such conclusions?

"...In this case everything was handled separately". The problem is that in the original version, the event handler called functions when events were received from both signal sources, and then those functions already filtered out the signal from the "unnecessary" source. But the functions were called every (!) time.

It doesn't really matter on what period the event handler is tested. If Lizar's scheme generates signals on a tick-by-tick basis, then they're scoring the event queue on a tick-by-tick basis as well, not once a day.

"I tried changing the frequency of events, but it didn't make any difference. More accurately I can say that the all ticks mode is the most accurate." Could you give me some comparative screenshots on Lizar's non-teak modes?

And I answered you for the third time in the most polite way possible. And smileys that you apparently perceived as mockery, in fact express my friendliness in relation to you. I'll try not to put them anywhere else, as they are so ambiguous.

tol64:

Good morning! ))

Apart from this separately excerpted phrase, I also wrote: "...I never rule out the possibility that I'm wrong somewhere and I always check everything. But even after the toughest checks, when at first glance everything looks right, I still can't rule out the possibility that there could be a mistake somewhere". I should add that I'm not the type of person who thinks they're always right about everything. )))

Had a look at the Timer topic. The key points I highlighted are:

1. While one event is being processed, the others may not be processed.

2. If the event stack overflows, old events are removed from the queue without being processed.

Let's take it in order. There is an enumeration of events:

...
code
...
During initialization, we specify from which character we will receive the event, and which event we will receive:
...
code
...

So, we will accept the CHARTEVENT_TICK event only from EURUSD. There are no other symbols.

The test has started. When any event occurs, the program enters the OnChartEvent() function, declares arrays of variables for the trading signals and checks for the event. If this is a custom event, the program determines the signal in TradeSignalCounter(), then it checks whether a new bar has occurred in TradePerformer() function and then decides on other conditions depending on this. The function has stopped working and will start working only when an event has occurred on the EURUSD chart. In other words, a tick in this case.

...

code
...

Execution of these functions is very fast. No event queue has time to overflow and we won't miss any significant events. And if the queue even overflows and events are missed, what will we miss? A tick, two ticks, three? So what of it? It's insignificant on the daytime bars.

What are you picking on this second source.))) There is no second source anymore. There is one - EURUSD, but the Expert Advisor trades on EURUSD from GBPUSD chart. And the results are identically wrong. A copy. That is, they are the same as if the second source is present. )))

-----------

Better do the test yourself, show the test results and write down (briefly) what you did to get the correct test results, if of course you manage to do so. The simplest expert will do for this test. Entry by any condition, Stop Loss, Take Profit. Let it be the daily bars of the last 10 years. And you will see for yourself. Some periods will coincide, and some will not. Open the results chart and see where the discrepancy is.

And after that you write:

Yedelkin:
About the ping-pong - a bit strange position. You are interested in a certain topic, you get an answer and ask leading questions, and you start to either challenge them or dismiss them. Do you or who needs the topic in the first place? I don't think anyone will do your work for you. Personally I do not give a damn about the results and the outcome of your choices are of little interest to me. The topic itself seemed worthy of attention, but the polemical fervor of the author creates doubts in the expediency of its maintenance.

Then there are questions.

1. What kind of reaction did you expect, if you keep repeating the same thing, namely that it is already irrelevant and that you have already been answered three times?

2. What makes you think that I am arguing? If you took my answers as an argument, you are mistaken, because I responded and explained what I was doing. But you took it as an argument because you were arguing yourself. )))

3. I never rely on someone else to do my job.

4. I'm not the only one who needs the topic, and all those who will encounter this problem. If you don't need it, then why did you enter the dialogue? My polemical fervour was only a consequence, the cause came from you.

---
I will not analyse your behaviour from the psychological point of view, otherwise you and I will have to fly out of the atmosphere. Therefore let us better try to keep the dialogue short and to the point. But if you don't need it, it is better not to continue. Because: Please observe the rules. )))

 

Of course, personally, I am not interested in parsing the peculiarities of other people's worldviews. I have already stated my conclusions about your polemical fervour above. There is nothing to add.

 
Yedelkin:

... Nothing to add.

Yeah, you better not. Otherwise, it'll just turn out to be idle chatter. Let's get back to the subject.

---

Did another series of tests. Previously presented test results were obtained in mode - Opening prices only. In my opinion, I managed to get correct results in this mode only using OnTimer() function. All other methods didn't show the correct results.

This time I have conducted tests in All ticks mode beginning from the beginning of 2011. At the same time, it was interesting to see how long this or that method would take. For example, in automatic testing of Expert Advisors for the Championship, an Expert Advisor must be tested in "All ticks" mode for no longer than 15 minutes. For this test, I built a simple Expert Advisor that trades on 12 currency pairs. The only conditions it contains are Stop Loss, Take Profit and Trailing Stop. There is no position widening and narrowing, no money management system, traded lot is fixed (0.1). The Expert Advisor is written without a single cycle, it is maximally simplified. The working time frame on all symbols is H8.

I optimized parameters for each symbol separately, in turn, using OnTick(). I did not wait for the optimization to finish. After 100 runs, I stopped the optimization and chose not the best variant, but the one with the lowest risk.

The processor frequency on which the testing was performed is 2 GHz. This is where it says what to focus on.

Further I will replace the word identical with almost identical as the goal is not an exact match but when analyzing the graph visually the differences should not be striking.

---

Test results:

The OnTimer() function was used for the first test because it gave almost identical results last time. And now its result will serve as a reference for comparison.

OnTimer()

The timer interval is 60 seconds.

The test lasted 27 minutes.

---

Timer interval 300 seconds:

The results are almost identical. The duration of the test is 26 minutes.

---

Timer interval 28800 seconds - 8 hours (timeframe used).

The results are almost identical. The duration of the test is 25 minutes.

I also did tests with 1800 and 3600 second intervals, the results are also consistent.

-----------

OnChartEvent()

The period of 1 minute is CHARTEVENT_NEWBAR_M1.

The results are almost identical. The duration of the test is 37 minutes.

---

Period of 1 minute - CHARTEVENT_NEWBAR_H1.

Results are almost identical. Test duration 27 minutes.

---

Period of 1 minute - CHARTEVENT_NEWBAR_H8.

Results are almost identical. The duration of the test is 27 minutes.

----------

OnTick()

The results are almost identical. The test duration is 72 minutes.

-----------------

In "All ticks" mode, all methods showed almost identical results. OnTick() turned out to be the longest variant. The test duration ofOnTimer() and OnChartEvent() are almost identical.

Report:

Bottom line:

In my case, even the simplest multicurrency Expert Advisor that trades on 12 currency pairs on a very large timeframe (H8) cannot be placed in the Championship, because it will not pass the test (15 minutes for the test). We will have to "cut the appetite" or search for methods to maximally optimize the Expert Advisor's code.

---

I wonder if anyone has achieved a fast test on 12 pairs? How long does your test take?

 
tol64:

I wonder if anyone has achieved a quick test on 12 pairs? How long does your test take?


3.
capr2011 on EURUSD:H1 every tick 2011.01.01-2011.08.01


4. start
finished in 3 min 21 sec


5. Statistics
1233 kb of log files
100 trades, 200 deals, profit 83043.82 USD
Reason: