[WARNING CLOSED!] Any newbie question, so as not to clutter up the forum. Professionals, don't go by. Can't go anywhere without you. - page 473

 
StatBars >>:

Point не может равняться 0, у Вас скорее всего 5-й знак и поэтому когда принтишь(Алерт) получается 0(принт(Алерт) выводит до 4 цнаков, если не преобразовать в строку DoubleToStr...)
попробуйте TakeProfit и StopLoss умножить на 10

Thanks for the tip. Point does have a 5th digit, so Alert didn't output it. DoubleToStr conversion showed Point = 0.00001.

But that's not the main thing, the main thing is that the position doesn't open and GetLastError() shows error #130.

 
Simulation quality 25.00% What
does this mean? What is simulated? How?
 
159753 писал(а) >>

Thanks for the tip. Point does have a 5th digit, so Alert didn't output it. DoubleToStr conversion shows Point = 0.00001.

But that's not the main thing, the main thing is that the position is not opened and GetLastError() shows error #130.


I have posted a corrected version on the previous page. Apparently you haven't watched it.

 
Hello.
Looking for trend indicators.
I want to check a simple MA first.
Do you know what is the optimal MA period for each TF
D1-
H4-
H1-
M30-
M15-
M5-
M1-
The idea is the following: when all MA are equal (price is lower/higher) only buy/sell will be filtered out
 
Vinin >>:


Я выложил на предыдущей странице исправленный вариант. Видимо ты его не смотрел.

I looked it up, it didn't help, the position still won't open.

 
iBarShift Search for a bar by time. The function returns the offset of the bar to which the specified time belongs. If there is no bar for the specified time (a "hole" in the history), the function returns, depending on the exact parameter, -1 or the offset of the nearest bar.
Please tell me, what do you mean by that?
If there is no bar, does the function return the shift of the bar nearest to it, or the shift of the bar nearest to it?
If it is the second variant, which bar is right or left if both are equally distant?

Do you know if there are any ready-made functions in MQL for working with time? Time addition, division of time periods, multiplication, etc.?
 
MoneyJinn писал(а) >>

Can you tell me what this means?
If a bar is missing, does the function indicate the offset of the adjacent bar closest to zero or closest to the missing bar?
If it is the second variant, which bar is right or left if both are equally distant?

Do you know if there are any ready-made functions in MQL for working with time? Time addition, division of time periods, multiplication, etc.?


I mean the bar index, if there is no bar, the error code will be returned.

Why do you need time multiplication? Or division? What for? In general, time can be handled as an integer.
 
Vitya >>:
Здравствуйте.
Ищу трендовые индикаторы.
Хочу проверить сперва простую МА.
Вы не знаете, кокой оптимальный период МА для каждого ТФ
D1-
H4-
H1-
M30-
M15-
M5-
M1-
Идея така: При совпадении напрявления всех MA(цена ниже/выше) отфильтровывать тьлько buy/sell

The best MA period is different for each area and, moreover, it can be different for different areas,

so do not look for a period, but for a system to determine the best period.

 
Hello, could you please advise how to make this code take parameters from eg m15 but the expert itself was on n4 ?
int start()
  {
//----  
  double A = 0.0;                           //Валидность среднего бара за 30 баров
for(int a = 0; a < 30; a++)
{     
 A += High[a];
}
double B = 0.0;   
for(int b = 0 ;b < 30; b++)
{     
 B += Low[b];
}
double AB = 0.0;
AB=(A-B)/30;
MessageBox("средний="+(AB));

//----
   return(0);
  }
//+------------------------------------------------------------------+
 
viktors писал(а) >>
Hello, could you please tell me how to make this code take parameters from eg m15 but the expert itself is on n4 ?

By data you mean High and Low? Then it goes like this
double x=iHigh( NULL,15, a)
Low also, it is for m15
Reason: