Author's - page 3

 
ivandurak:
I´m at the stage of writing a Strategy Tester, and I´m facing a dilemma. If we take 4 as a base we get a simple and very effective tool in terms of TS analysis based on trading results. If we take 5, then the convenience of portability of the code. So far, my imho is inclined to the first option, as they say in check or go.

Herehttps://www.mql5.com/ru/forum/4956/page46#comment_117097 andhttps://www.mql5.com/ru/forum/4956/page47#comment_118646, you can have a look for starters.

Checks and dashes first, then rides. imho.

 
Bene_Nota:
And to my observations history does not repeat itself, so I would not agree on the first point.

Argue.

We are not saying that the current movement will be exactly one pip closer to what it was. If we take a few signs of a flat, a few signs of a trend, let's put it all into a neuronet, we will get a limited number of clusters (this is not my conclusions, I saw a note where I can't find it). We can build an adequate TS for any piece of history or a cluster needs no proof. Thus, we should timely recognize in which cluster we are, to have time to pick some crumbs. Make statistics, time to find, think about possible trajectory of market characteristics to preemptively select the TS .........

That.human

I will take a look. The thing is that if we accept the order and position running philosophy for 5 . I think that the best of multitemporal Expert Advisors is complicated by net position, without any additional equation it is impossible to tell which TS on an hour or minute is more preferable, and if you have a multitemporal strategy I don't know how to approach such a task except for creation of a set of objects and their management. Everything is much simpler on 4 in terms of programming convenience. It is enough to create an array of structures describing the order, each of which has its own life, all the data on opening, closing, profits, losses are saved. I already did that, and it turned out to be quite an acceptable solution.

 
ivandurak:

To her.human

Thanks .

1) The thing is that if we accept the 5's order and position running philosophy. I don't know how to solve this problem except for creation of a lot of objects and their management.

2) In 4, everything is much easier from a programming convenience point of view. It is enough to create an array of structures describing the order, each of which has its own life, all the data on opening, closing, profits, losses are saved. I already did it, it turned out to be quite an acceptable solution.

1) The point is that if you make a virtual journal (tester) of managing and accounting positions in MT5, all problems with simultaneous testing of multiple strategies and locking (related to the use of multiple strategies), disappear. Also, you can conduct a virtual trade and, based on the analysis of virtual trade, make conclusions for the real trade, and bring the total position to the market.

I did such a thing in MT5, but not as a separate library (class), I do not see any problems.

2) In MT4 there is noarray structures . In MT4, you can do the same without problems, but use a two-dimensional array instead of the array of structures.

Maybe something is mixed up between MT4 and MT5?

 
her.human:

1) That's the point, if you make a virtual journal (tester) of managing and accounting positions in МТ5, all problems with simultaneous testing of several strategies and locking (related to the use of several strategies) disappear. Also, you can conduct a virtual trade and, based on the analysis of virtual trade, make conclusions relative to the real trade, and bring the total position to the market.

I did such a thing in MT5, but not as a separate library (class), I do not see any problems.

2) In MT4 there is noarray structures . In MT4, you can do the same without problems, but use a two-dimensional array instead of the array of structures.

Maybe something is confused MT4 - MT5?

We are talking about the same thing in different words. I just use the trading functions of MT4 copy as a necessary and sufficient minimum.

I have another problem here, how to synchronize trading instruments for multicurrency tester. I will go through the articles.

Документация по MQL5: Торговые функции
Документация по MQL5: Торговые функции
  • www.mql5.com
Торговые функции - Документация по MQL5
 
ivandurak:

We are talking about the same thing in different words .

1) I just use the trading functions of the MT-4 copy as a necessary and sufficient minimum.

2) I have another problem, how to synchronize trading tools in a multi-currency tester. I will go over the articles.

1) I agree. My point is the same.

2) We don't need synchronization for the tester. Feeding quotes into the tester is another matter.

What's the problem with synchronization? Maybe I'll give you a hint.

 
her.human:

1) I agree. That's what I mean.

2) Synchronisation is not necessary for a tester. Feeding quotes into the tester is a different topic.

What's the problem with synchronisation? Maybe I'll give you a hint.

I have not yet completely formulated the task myself .

For multicurrency testing all bars on the selected symbols should be synchronized at a selected optimization segment. Otherwise, if there is a gap, it may result in looking into the future (tester's grail on 4, signals for one instrument may open positions for another).

Basically, we can work out the details of bar synchronization, forming our own array of synchronized quotes that will be used by the tester.

The problem is in constructing indicators, on which strategies are based in most cases, because the value of the indicator is calculated for a specific bar number. If we can correct the files with history in 4, we can not do it here.

As an alternative, we run the EA in multicurrency mode, the terminal synchronizes the history itself, now we write the history file along with indicator values, and if necessary we will dive into it, but it is scratching the right ear with the left hand.

 
ivandurak:

I have another problem here, how to synchronize trading tools if I make a multi-currency tester. I'm going to look through the articles.

There is a solution of synchronization issues for the real accounthere . Perhaps it will give you some ideas about synchronization for your tester.
 

The best thing so far is to add a method.

bool  HoleHistory(int Bar,string Simb) ;//метод возвращает признак дыры в истории если выбранный бар выбранного символа
      //моложе одноименного бара хотя бы одного из выбранных символов возвращaем фальсе расчеты на этом баре не производятся  
However, there is still a link to the financial instrument that is being tested.
 
ivandurak:

I haven't formulated the task yet.

For multicurrency testing all of the bars on selected symbols should be synchronized at a selected optimization segment. Otherwise, if there is a gap, we may get a peek into the future (tester's grail on 4 - signals for one symbol open positions for another).

Basically, we can work out the details of bar synchronization, forming our own array of synchronized quotes that will be used by the tester.

The problem is in constructing indicators, on which strategies are based in most cases, because the value of the indicator is calculated for a specific bar number. If we can correct the files with history in 4, we can not do it here.

As an alternative, we run the EA in multicurrency mode, the terminal synchronizes the history itself, now we write the history file together with indicator values and dive into it when necessary.

If I understand the problem correctly.

//=============================================================================================
// Подготавливаем массивы цен с синхронизацией по времени 
void PrepareQuotes()
{
 CopyTime("EURUSD",0,0,Количество_Баров,Time);
 CopyOpen("EURUSD",0,0,Количество_Баров,OpenEU);
 for(int i=0; i<Количество_Баров; i++)
    {
     CopyOpen("EURJPY",0,Time[i],1,OpenEJ);
     CopyOpen("EURGBP",0,Time[i],1,OpenEG);
    }
}
//=============================================================================================
// Получаем значение индикатора по времени    
CopyBuffer(handle,0,Time[i],1,Buffer);

The indicator should not be calculated by the bar number, but by time. Or calculate it yourself, there are enough libraries in the base.

 
If there is a skip before the bar for an instrument, it is better not to do anything at all. It is easy to identify the gap, it is enough to compare the opening time of the bar with the opening time of the bar on other instruments.
Документация по MQL5: Стандартные константы, перечисления и структуры / Торговые константы / Свойства позиций
Документация по MQL5: Стандартные константы, перечисления и структуры / Торговые константы / Свойства позиций
  • www.mql5.com
Стандартные константы, перечисления и структуры / Торговые константы / Свойства позиций - Документация по MQL5
Reason: