[ARCHIVE] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 3. - page 266

 
ScioMe:


PF is the Profit Factor, I see. And what is FF? Is it possible to make the tester output these values, like it outputs the MO?

If I give you the MO, profitability, number of trades, date, maximum drawdown, can you say anything about the quality of the EA?


FS is recovery factor = net profit/maximum drawdown.

see. "quality of an EA"...:-)))

 
ScioMe:

If I give you the MO, profitability, number of trades, date, maximum drawdown, can you say anything about the quality of the EA?


It's easier than a tester's report header. And all the same: it is very important to know how the result was obtained, it is one thing to know the best optimization result, and another thing is to know the basic principles of the Expert Advisor. And only then, with some experience, you can diagnose the expert with the probability of success greater than a guess (let's say 7-8 out of 10 cases).
 
Forgive my ignorance, but what is a forward?
 

Have a look at the article "Testing and Optimising EAs".

There it is described in detail - what it is, a forward test.

 

Please help. just started programming in mql

I need to do such a thing.

I do not need to write any code, although the purpose of this work is

if 1 order has already been opened and closed, expert will not work on that day.

If an order is opened and closed with a negative balance, the Expert Advisor will stop working for the day.

 

Have a look at https://www.mql5.com/ru/forum/131859

The functions from page 4 will (most likely) be useful to you here:

isTradeToDay - Returns flag of trade today

isLossLastPos - Returns flag of loss of the last position.

isCloseLastPosByStop - Returns the flag to close the last position by stop
isCloseLastPosByTake - Returns a flag to close the last position by Take.

NumberOfBarCloseLastPos - Returns the bar close number of the last position or -1. (=0 on tfD - for today's close)

NumberOfLossPosToday - Returns the number of losing positions closed today.

etc.

 

Good afternoon all! Send me where nit where you can see (to read) how to remake the regular indicator MACD, so it shows the values H4 on H1, ie during the 4 hours on the H1 to draw the same bar period values H4

Thank you!

 

Hello. Could you please help me with the While operation. I made a script that was supposed to draw horizontal lines between levels, but it only draws the first line and then hangs. What am I doing wrong?

The code is attached.

//+------------------------------------------------------------------+

//| H_LINES.mq4

//| Copyright © 2011, MetaQuotes Software Corp.

//| http://www.metaquotes.net |

//+------------------------------------------------------------------+

#property copyright "Copyright © 2011, MetaQuotes Software Corp.

#property link "http://www.metaquotes.net"


//+------------------------------------------------------------------+

//| script program start function |

//+------------------------------------------------------------------+

double Min_Level = 1.40000; //Lower boundary

double Max_Level = 1.60000; //Higher limit

double Step = 200; // Step (distance between lines) in pips

int Lines_Width = 2; // Line width

color Lines_Color = Green; //Lines colour

double i; //formal variable


int start()

{

//----

i=Min_Level;

while ( i < Max_Level )

{

ObjectCreate ("H_LINE",OBJ_HLINE,0,0,i);

ObjectSet ("H_LINE",OBJPROP_COLOR,Lines_Color);

ObjectSet ("H_LINE",OBJPROP_WIDTH,Lines_Width);

i = Min_Level + (Step/10000);

}

//----

return(0);

}

//+------------------------------------------------------------------+

Thank you.

 
Gerkl:

Hello. Could you please help me with the While operation. I made a script that was supposed to draw horizontal lines between levels, but it only draws the first line and then hangs. What am I doing wrong?

The code is attached.

//+------------------------------------------------------------------+

//| H_LINES.mq4

//| Copyright © 2011, MetaQuotes Software Corp.

//| http://www.metaquotes.net |

//+------------------------------------------------------------------+

#property copyright "Copyright © 2011, MetaQuotes Software Corp.

#property link "http://www.metaquotes.net"


//+------------------------------------------------------------------+

//| script program start function |

//+------------------------------------------------------------------+

double Min_Level = 1.40000; //Lower boundary

double Max_Level = 1.60000; //Higher limit

double Step = 200; // Step (distance between lines) in pips

int Lines_Width = 2; // Line width

color Lines_Color = Green; //Lines colour

double i; //formal variable


int start()

{

//----

i=Min_Level;

while ( i < Max_Level )

{

ObjectCreate ("H_LINE",OBJ_HLINE,0,0,i);

ObjectSet ("H_LINE",OBJPROP_COLOR,Lines_Color);

ObjectSet ("H_LINE",OBJPROP_WIDTH,Lines_Width);

i = Min_Level + (Step/10000);

}

//----

return(0);

}

//+------------------------------------------------------------------+

Thanks.

first of all:

i = Min_Level + (Step/10000);

your i does not change


secondly

ObjectCreate ("H_LINE",OBJ_HLINE,0,0,i);

each object should have its own unique name

 

Help pdz.... Continuing to study the tutorial - came across something that is not clear to me, can't figure out

//--------------------------------------------------------------------
// callindicator.mq4
// Предназначен для использования в качестве примера в учебнике MQL4.
//--------------------------------------------------------------------
extern int Period_MA = 21;            // Период расчётной МА
bool Fact_Up = true;                  // Факт сообщения, что цена..
bool Fact_Dn = true;                  //..находится выше или ниже МА
//--------------------------------------------------------------------
int start()                           // Спец. функция start  {
   double MA;                         // Значение МА на 0 баре    
//--------------------------------------------------------------------
                                      // Обращение к функции техн.инд.
   MA=iMA(NULL,0,Period_MA,0,MODE_SMA,PRICE_CLOSE,0); 
//--------------------------------------------------------------------
   if (Bid > MA && Fact_Up == true)   // Проверка прохода вверх     {
      Fact_Dn = true;                 // Сообщать о цене выше МА
      Fact_Up = false;                // Не сообщать о цене ниже МА
      Alert("Цена находится выше MA(",Period_MA,").");// Сообщение      }
//--------------------------------------------------------------------
   if (Bid < MA && Fact_Dn == true)   // Проверка прохода вниз     {
      Fact_Up = true;                 // Сообщать о цене ниже МА
      Fact_Dn = false;                // Не сообщать о цене выше МА
      Alert("Цена находится ниже MA(",Period_MA,").");// Сообщение      }
//--------------------------------------------------------------------
   return;                            // Выход из start()  }
//--------------------------------------------------------------------

A simple function that tells me if price is above or below the EMA. But that's not even the question.

why when Fact_Dn and Fact_UP take true or false values in function start, these values are also taken by global variables? It's not like we use return(Fact_Up) for example... unclear... or can we not use it?