Errors, bugs, questions - page 350

 
sergeev:

1. Write your tester

2. Wait for visualisation

3. test in real-time mode. tedious and long
 
papaklass:
Спасибо за ответы. И какой же выход, если рисовать нужно?

sergeev:

1. Write your tester

2. Wait for visualisation

Or remember the values you were going to draw on and work from them without drawing.
 

I can not understand where the error is, the following code checks the profit on 2 currency pairs

     double prof2 =0.0;
     if(PositionSelect(Symbol2)) prof2=PositionGetDouble(POSITION_PROFIT);
     double prof1 =0.0;
     if(PositionSelect(Symbol1)) prof1=PositionGetDouble(POSITION_PROFIT);
     Print ("1дол---prof1=",prof1,"prof2=",prof2);

In the first minutes after the opening in the log:

DK      0       Per_Dol_raz (EURUSD,M1) 17:02:20        2010.04.05 00:01:00   3---del=60.2999999999998
CK      0       Per_Dol_raz (EURUSD,M1) 17:02:20        2010.04.05 00:01:00   1---P1=1 raz1=0.000180000000000069 Sred1=1.80000000000069
MI      0       Per_Dol_raz (EURUSD,M1) 17:02:20        2010.04.05 00:01:00   2---P2=1 raz2=0.006210000000000049 Sred2=62.10000000000049
FS      0       Per_Dol_raz (EURUSD,M1) 17:02:20        2010.04.05 00:01:00   3---del=60.2999999999998
JR      0       Trade   17:02:20        2010.04.05 00:01:00   instant sell 0.10 GBPUSD at 1.52662 (1.52662 / 1.58921 / 1.52662)
FE      0       Trades  17:02:20        2010.04.05 00:01:00   deal #2 sell 0.10 GBPUSD at 1.52662 done (based on order #2)
MF      0       Trade   17:02:20        2010.04.05 00:01:00   deal performed [#2 sell 0.10 GBPUSD at 1.52662]
GG      0       Trade   17:02:20        2010.04.05 00:01:00   order performed sell 0.10 at 1.52662 [#2 sell 0.10 GBPUSD at 1.52662]
LN      0       Per_Dol_raz (EURUSD,M1) 17:02:20        2010.04.05 00:01:00   продажа 2 инструмента:GBPUSD
EL      0       Trade   17:02:20        2010.04.05 00:01:00   instant buy 0.10 EURUSD at 1.38070 (1.34912 / 1.38070 / 1.34912)
FJ      0       Trades  17:02:20        2010.04.05 00:01:00   deal #3 buy 0.10 EURUSD at 1.38070 done (based on order #3)
LG      0       Trade   17:02:20        2010.04.05 00:01:00   deal performed [#3 buy 0.10 EURUSD at 1.38070]
CQ      0       Trade   17:02:20        2010.04.05 00:01:00   order performed buy 0.10 at 1.38070 [#3 buy 0.10 EURUSD at 1.38070]
DL      0       Per_Dol_raz (EURUSD,M1) 17:02:20        2010.04.05 00:01:00   покупка 1 инструмента:EURUSD
RN      0       Per_Dol_raz (EURUSD,M1) 17:02:20        2010.04.05 00:01:00   $$$sum=-941.7000000000001 prof1=-315.8 prof2=-625.9
NE      0       Per_Dol_raz (EURUSD,M1) 17:02:20        2010.04.05 00:01:00   дол1...vol1=0.1 vol2=0.1
DK      0       Per_Dol_raz (EURUSD,M1) 17:02:20        2010.04.05 00:01:00   1 дол---prof1=-315.8 prof2=-625.9
MO      0       Per_Dol_raz (EURUSD,M1) 17:02:20        2010.04.05 00:01:00   1 дол---del=15 sot=15

In the first minute of the opening a new bar has not yet formed writes that - 941,7 dollars.

The test goes on m1 "only on opening prices" server - Alpari, ticket 425.

There is no way that a bar has not yet appeared and already minus 1000.

But from November 2010 to February 2011 this has never happened!

//--------------???????????????????????????????????????????-----------------//

 

Took it to XP tested with ticket 421 and there were 7 with ticket 425.

Nonsense but everything works as it should.

//---------------------------------------------------------------------//

If it is not difficult please tell me how to save the results of the optimizer,

not a picture, namely the variants of passes with settings (parameters)

and the result (profit) is better, of course, if you can save it in html . Thanks

Документация по MQL5: Стандартные константы, перечисления и структуры / Константы индикаторов / Стили рисования
Документация по MQL5: Стандартные константы, перечисления и структуры / Константы индикаторов / Стили рисования
  • www.mql5.com
Стандартные константы, перечисления и структуры / Константы индикаторов / Стили рисования - Документация по MQL5
 
Im_hungry:

not the drawing, but the variants of the passes with settings (parameters)

and the result (profit) is better of course if you can save it in html . Thank you

Look at the Optimization results section in the terminal help
 
Rosh:
Have a look at the optimisation results section in the terminal help
Cool thanks!
 

Please advise which of the points in the figure is the most promising, so to speak.

if the optimization criterion (complete search of parameters) is max.profit + min.drawdown

As I understand the highest point indicates that the profit + drawdown is maximal + minimal

of all passes of the tester?

 
MetaDriver:

Most likely they don't have time to initialize completely. Idea is to use sleep(pause) to give time for initialization and initial calculation, but I don't know if sleep() will work in tester.

I faced with similar thing, until now one expert unreliably starts in tester (also with "thick" indicator), I still have not got time to finish it.

It's not that it doesn't try to initialize them, it just immediately passes out after synchronization of quotes.
 
papaklass:
Of course, I'll do it, but it's not convenient.

Write wrappers for the graph object functions. Name this class of functions, for example "GrafObject" and save the necessary data in the properties of your object and create the graph object itself. So, regardless of whether you are in the tester or not, you'll always have information about the object and the objects themselves on the chart.

class CGrafObject
  {
... переменные_хранящие_свойства_объекта; ...
public:
                     CGrafObject(void){};
                    ~CGrafObject(void){};
   ... обёртки_получения_и_установки свойств(){} ...   
   ... обёртки_функциям_граф_объектов(){}...
  };
 

Error in CDealInfo::TypeDescription() :

instead of switch(Type()) switch(DealType())

Also inCHistoryOrderInfo::TypeDescription():

instead of return(FormatType(str,Type())); it needsreturn(FormatType(str,OrderType()));

Reason: