Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 1362

 
MakarFX:
not work, the new high/low will not take them into account
That's the way it's supposed to be.
 
Aleksei Stepanenko:
That's the way it should have been.
Yes, that's the way it should have been. Thanks for the tips, everyone!
 
Aleksei Stepanenko:
This seems to be the way it should have been.
Khai may grow until it reaches a low and we should go from the maximum high to the low, i.e. like a zig-zag, but extremums are determined by the indicator's condition
 
azolotta:

MakarFX:
Khai may rise until it reaches a low and should be from a max high to a low, i.e. like a zig-zag, but defining extrema according to the conditions of the indicator

Yes, it is a regular zig-zag with conditions,

but maybe azolotta doesn't want rewires, but something like real trading: once bought, so bought,

so I understand.

 
DanilaMactep:

Good afternoon, all.

Try

//+-------------------------------------------------------------------------------- Разделитель ---+
double stoplevel=MarketInfo(Symbol(),MODE_STOPLEVEL)*Point; 
if(tip_sl==en_po_atr)                                                      //ЕСЛИ ТИП СТОП ЛОССА СТОИТ ПО АТР ТО ВЫСЧИТЫВАЕМ ЕГО ИЗ АТР
  {
   sl=NormalizeDouble(iATR(NULL,PeriodForWork_sl,atr_sl_period,1),Digits); // ПОЛУЧЕНИЕ ЗНАЧЕНИЙ АТР ДЛЯ ВЫСТАВЛЕНИЯ СТОПЛОССА
   if(sl<stoplevel)                                                        // ЕСЛИ СТОПОЛС МЕНЬШЕ ЧЕМ МИНИМАЛЬНО ДОПУСТИМЫЙ УРОВЕНЬ ЕГО УСТАНОВКИ ТО
     {
      sl=NormalizeDouble(stoplevel*1.5,Digits);                            //СТОП ЛОССУ ПРИСВАЕВАЕМ МИНИМАЛЬНО ДОПУСТИМУЮ ВЕЛИЧИНУ ЕГО УСТАНОВКИ
     }
  }
else                                                                       //ИНАЧЕ- ТО ЕСТЬ ЕСЛИ СТОП ЛОСС ФИКСИРОВАННЫЙ В ПУНКТАХ
  {
   sl=NormalizeDouble(razmer_fikc_sl*Point,Digits);                        // ПЕЕРМЕННОЙ СТОП ЛОССА ПРИСВАЕВАЕМ ФИКСИРОВАНОНЕ ЗНАЧЕНИЕ ПУНКТОВ И ДОМНОЖАЕМ НА ПОИНТ
   if(sl<stoplevel)                                                        // ЕСЛИ СТОПОЛС МЕНЬШЕ ЧЕМ МИНИМАЛЬНО ДОПУСТИМЫЙ УРОВЕНЬ ЕГО УСТАНОВКИ ТО
     {
      sl=NormalizeDouble(stoplevel*1.5,Digits);                            //СТОП ЛОССУ ПРИСВАЕВАЕМ МИНИМАЛЬНО ДОПУСТИМУЮ ВЕЛИЧИНУ ЕГО УСТАНОВКИ
     }
  }
//+-------------------------------------------------------------------------------- Разделитель ---+
tp=NormalizeDouble(sl*tp_v_R,Digits);                                      // ВЫЧИСЛЯЕМ ПРОФИТ УМНОЖАЯ СТОП ЛОС НА КОЛИЧЕСТВО РИСКА
if(tp<stoplevel)                                                           // ЕСЛИ ПРОФИТ МЕНЬШЕ ЧЕМ МИНИМАЛЬНО ДОПУСТИМЫЙ УРОВЕНЬ ЕГО УСТАНОВКИ ТО
  {
   tp=NormalizeDouble(stoplevel*1.5,Digits);                               // ПРОФИТУ ПРИСВАЕВАЕМ МИНИМАЛЬНО ДОПУСТИМУЮ ВЕЛИЧИНУ ЕГО УСТАНОВКИ
  }
//+-------------------------------------------------------------------------------- Разделитель ---+
 
MakarFX:

Try

Thanks so much for the code - I'm off to try and fit it into the Grail without breaking anything at the time)))))))))) but I'll be back if anything happens

 
MakarFX:
This is a recording infringement, a system write ban.
Good afternoon. Thank you for your reply. What is the reason for this problem? The thing is that in my terminal, this EA calls indicators without errors and works fine. My friend's EA with the same indicators has the same error. Where to dig?
 
DanilaMactep:

Thanks so much for the code - I'm off to try and put it into the Grail without breaking anything in the process)))))))))) but I'll be back if anything happens

delete that line.

double sl,tp,tp_v_R;
 
Sergey Fionin:
Good afternoon. Thanks for the reply. And what is the reason for this problem? The thing is that in my terminal, this EA calls the indicators without errors and works fine. My friend's EA with the same indicators has the same error. Where to dig?

These are Windows system settings and there are many options.

I advise the mate to run " /portable" and then there will be no problems

 
MakarFX:

Try

All started up and piss down the pipes)))))))))))))))))))))) Thanks so much for all your help!!!