Suggestions for improving the MetaEditor - page 6

 
Lizar:
Try. Works in the tester. But with the adjustments stipulated in the article.

And what in the tester to send through the event?

A) Charts in the tester are not opened

B) the event indicators do not receive

The Expert Advisor will send events to itself, so what's the point?

 

Обработка событий в тестере

The presence of the handler OnTick() in an Expert Advisor is not necessary in order to be tested on historical data in the Strategy Tester of the MetaTrader 5 terminal. It is sufficient that the Expert Advisor has at least one handler function from those listed above:

When testing in an Expert Advisor, custom events can be handled by OnChartEvent(), but in indicators this function is not called in the tester. Even if the indicator has the OnChartEvent() handler , and this indicator is used in the Expert Advisor under test, the indicator itself will not receive any custom events.

The indicator during testing can generate custom events using the EventChartCustom() function, while the Expert Advisor can process these events in OnChartEvent().

1. At the moment, as far as I remember, the Expert Advisor in the tester does not process the events sent using the EventChartCustom() function

2. The article contains an indication that the function will not work in the indicators in the tester, but the Help file does not. How do you understand it?

3. well, it's not right when something works in demo/real and doesn't work in tester. Whatever you want to do to me, it's still wrong.

If I do OnChartEvent() in indicators, let it work everywhere, otherwise there's no sense in keeping it there...

PS

Question for developers - doesn't it work in the tester at all, or just what is sent with OnChartEvent()?

 
Urain:

And what in the tester to send through the event?

A) The charts in the tester are not opened

B) indicators do not receive events

the Expert Advisor will send events to itself, what's the point of that?

Makes sense, I, for example, have successfully sent myself, and more than one (until the tester broke event reception).

And when the tester starts to understand and process the chart, it will be logical to receive events...

 

The question is unclear. What do you mean by "it doesn't work in the tester at all, or only processes what is sent with OnChartEvent()"?

There is no mechanism in the tester to deliver ChartEvent to indicators. The cycle of events delivery to the Expert Advisor under test is precisely the main part of the tester.

 
Interesting:

There is a point, I, for example, successfully sent myself, and more than one (until the event reception was broken in the tester).

So the tester used to have event reception, but then it was broken?
 
Interesting:

It makes sense, I, for example, successfully sent myself, and more than one (until the tester broke event reception).

And when the tester starts to understand and process graphics, it will be logical to receive events...

Within one program there are many possibilities to transfer information, but the meaning of events is the transfer of information between different programs.
 
Lizar:

It's been a couple of weeks since it was officially announced in the article:

Officially sort of announced in "build updates", not in articles. Was there anything in the "updates"?
 
Urain:
Within one program there are many opportunities to transfer information, the point of events is to transfer information between different programs.

The point is not how to deliver, but that what was working in the tester (and should have been) stopped working there about 6 months ago.

stringo:

There is no mechanism in the tester to deliver ChartEvent to indicators. The cycle of events delivery to the Expert Advisor under test is the main part of the tester.

So there used to be event reception in the tester and then it was broken?

I mean the problem of EventChartCustom() -> OnChartEvent() in the tester for Expert Advisors. Maybe I don't understand something, but before the championship it was working fine, but not now.

At the same time, I think everybody knows and understands this already, but the "locomotive" is still not moving (despite the fact that this is exactly the "main part").

A simple example:

1 . We initialize the Expert Advisor by starting a timer every 300 seconds (5 minutes).

//Function OnInit
int OnInit()
//Function for initialization of the trade system
{
//----------------------------------------------------------------------------//
int Result = 0; //Returned importance
//----------------------------------------------------------------------------//

EventSetTimer(300);

//----------------------------------------------------------------------------//
return(Result);
//----------------------------------------------------------------------------//
}

2. In the timer we prescribe sending the event with code 1001

//Event OnTimer
void OnTimer()
{
//----------------------------------------------------------------------------//
//Work variables
int customEventID; // номер пользовательского события для отправки
//----------------------------------------------------------------------------//
customEventID=CHARTEVENT_CUSTOM+1;

EventChartCustom(0,(ushort)(customEventID-CHARTEVENT_CUSTOM),0,0,"OnTimer - EventChartCustom");
//----------------------------------------------------------------------------//
}
3. catch this event in the Expert Advisor
//Event OnChartEvent
void OnChartEvent(const int id,
                  const long& lparam,
                  const double& dparam,
                  const string& sparam
                  )
{
//----------------------------------------------------------------------------//
//Work variables
//----------------------------------------------------------------------------//

//----------------------------------------------------------------------------//
//                          Processing user events                            //
//----------------------------------------------------------------------------//
  if(id>CHARTEVENT_CUSTOM)
  //User event is received
  {
  Print("New event, ID ",id," - ",sparam);
  }
//----------------------------------------------------------------------------//  
}


The result is that the Demo gets the event, but the Strategy Tester does not.

And this is kind of a basic element of the trading system that is supposed to work even in the case of "nuclear war".

1. Demo with a 1 minute timer


2. a tester with a timer of 1 hour


I should also add that testing was performed from 01/04/2011 to 07/04/2011 at timeframe 1H.

And where are they?

PS

Maybe someone thinks that if a message doesn't get from Expert Advisor, it will get from iinduke?


 
Yedelkin:
Officially sort of announced in "updates builds", not in articles. Was there anything in the "updates"?

Yes there was nothing, as the bug appeared so it weighs.

And about the fact that in the article so it should not be specified in the articles, and not even in the description of new builds, although there too.

In fact, such things should be prescribed in the language handbook. Show me where there is even a word about it (I personally couldn't find it)...

 
stringo:
So there used to be event reception in the tester and then it was broken?

That's what I should be doing, properly preparing for the state exam. what I'm doing is looking for my posts on the forum. :)

1. Bugs, bugs, questions.

Bugs , bu gs, questions.

Wanted to find the first post about the problem, and did not dig it, although I remember that during the championship already did not work fic...

Let's assume the post dated 05/09/2010 and was the first on the given topic. Conclusion - it's been 8 months already... :(

PS

Here's more on that:

My example from 06/09/2010

And even Alexey promised to think about a solution to the problem

Reason: