[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 937

 
q1shock:

//===========================================================================

who can help, explain in russian

how the methodology of training takes place (conditionally, it does not matter which algorithm yet) Neuronka

so the methodology of selection ( tucking parmeters aka values ) is clear

- genetics

- propagation of the backward error (for example)

But what about training? If the fitting logic is not clear - ok, training is finished.

or drop me a link i would be very grateful.

//===========================================================================

i.e. in the tester it is clear there at the expense of building up profits - ok.

but let's say just a perfect sinusoidal sample of xxx values

how is it =) goes the concept of good and enough ?

Thanks in advance for the reply on the subject.

chrs

http://neuroschool.narod.ru/articles.html#abc
 

thanks for the link, what's the best place to start

to catch the logic of the question :?

 
Noterday:

I've installed Microsoft Visual Studio 2010, chose programming in C++, and a window opened for code. Does anybody know how to create a form?

When programming in Microsoft Visual Studio 2010, a form appears immediately and only then you can proceed with the code; what about C++?

I don't think anything has changed since 2008, and I've only recently mastered it... Anyway, try it this way:

right click on the directory in Solution Explorer->Add->New Item->select Windows Form

 
trader_fx:

Good afternoon. Please make an iBandsOnArray indicator on the macda. It should be like on the screenshot.



b.band on macd

Files:
 
q1shock:


b.band on the macd

Thank you.
 
001:

Guys, give me an example of how to correctly place an expiration in a stop order. Let's say one minute, 20 minutes, one hour. I can not find and myself do not understand. I am grateful in advance.


here's an example from the guys =)

Files:
tmp.mq4  2 kb
 
Skopcheny:
What if the variable is to be used in the future for some calculations and not just for printing?
Files:
tmp_1.mq4  1 kb
 
Skopcheny:
What if the variable is to be used in the future for some calculations and not just for printing?
Use it - it's fine. That's just how the printer outputs it. And the variable contains as many characters as you want in memory.
 
bool isCloseLastPosByStop(string sy="", int op=-1, int mn=-1) {// Объявление функции. Передаваемые параметры: sy = символ, op - тип, mn - магик
  datetime t;                                                  // Переменная содержит время закрытия ордера
  double   ocp, osl;                                           // ocp - цена закрытия позиции, osl - цена СтопЛосс закрытой позиции
  int      dg, i, j=-1, k=OrdersHistoryTotal();                // k содержит общее количество ордеров в истории

  if (sy=="0") sy=Symbol();                                 // Если в ф-цию передан sy равный 0 или NULL, то использовать символ графика
  for (i=0; i<k; i++) {                                     // Цикл по массиву закрытых ордеров
    if (OrderSelect(i, SELECT_BY_POS, MODE_HISTORY)) {      // Если выбран ордер из массива закрытых ордеров, ...
      if (OrderSymbol()==sy || sy=="") {                    // ... если его символ совпадает с нашим, ...
        if (OrderType()==OP_BUY || OrderType()==OP_SELL) {  // ... если его тип Бай или Селл, ...
          if (op<0 || OrderType()==op) {                // ... если тип ордера равен или -1 (имеется ввиду любой) или равен переданному в ф-цию, ...
            if (mn<0 || OrderMagicNumber()==mn) {       // ... если его магик или любой (-1) или равен переданному в ф-цию (магику советника), ...
              if (t<OrderCloseTime()) {    // ... если переменная t содержит время закрытия меньше, чем время закрытия выбранного ордера, то ...
                t=OrderCloseTime();        // ... то присвоим переменной t время закрытия выбранного ордера (этот ордер закрыт позже предыдущего)
                j=i;                                        // Запишем в переменную j индекс найденного ордера с максимальным временем закрытия
              }
            }
          }
        }
      }
    }
  }                                                       // По окончании цикла в переменной j находится индекс последнего закрытого ордера
  if (OrderSelect(j, SELECT_BY_POS, MODE_HISTORY)) {      // Выберем его по индексу
    dg=MarketInfo(sy, MODE_DIGITS);                       // Количество цифр после десятичного точки в цене инструмента, заданного переменной sy
    if (dg==0) if (StringFind(OrderSymbol(), "JPY")<0) dg=4; else dg=2; // Честно... точно не скажу, но вижу, что корректировка под йену
    ocp=NormalizeDouble(OrderClosePrice(), dg);           // Нормализуем цену закрытия ордера для дальнейшего сравнения с ценой СтопЛосс
    osl=NormalizeDouble(OrderStopLoss(), dg);             // Нормализуем цену СтопЛосс ордера для сравнения с ценой закрытия
    if (ocp==osl) return(True);                           // Если эти цены равны, значит поза закрыта по стопу, возвращаем значение "Истина"
  }
  return(False);                                          // Возвращаем "Ложь"
}


It seems to get to me, honestly with difficulty, I even printed on a sheet to read on the way, one thing I do not understand "JPY" from where? why?

and tell me where do i put this code correctly? if i am not mistaken it should be outside all functions?

 
gheka:


It seems to get to me, honestly with difficulty, I even printed on a sheet to read on the way, one thing I do not understand "JPY" from where? why?

and tell me where to put this code correctly? if i am not mistaken it should be placed outside of all functions?

You need to correct digits for yen if you're working with yen and the order symbol contains a JPY. Do not bother - this function will do everything for you. And it should be placed, as well as any other functions outside the body of the EA. And you should call it from the EA as follows:

if (isCloseLastPosByStop(Symbol(), OP_BUY, Magic)) // Если последняя закрытая позиция Buy на текущем графике с магиком Magic была закрыта по стопу, то ...
   {
      // .......... тут код, который выполнится при данном условии
   }
//--------------------------------------------------------------------------------------------------------------------------
if (isCloseLastPosByStop(USDJPY, OP_SELL, Magic)) // Если последняя закрытая позиция Sell с символом USDJPY с магиком Magic была закрыта по стопу, то ...
   {
      // .......... тут код, который выполнится при данном условии
   }
//--------------------------------------------------------------------------------------------------------------------------
if (isCloseLastPosByStop()) // Если любая последняя закрытая позиция с любым символом и любым магиком была закрыта по стопу, то ...
   {
      // .......... тут код, который выполнится при данном условии
   }
Reason: