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

 
ntmmm >>:

Огромное спасибо! Вот только теперь вопрос к программерам: а можно ли, что бы дни недели не цветом рисовало, а все-таки писало в этом отрезке текстом?


Good day!

Glad my indicator - WeekDay in the forum - just that posted (in the tester does not work).

P.S.What you had everything and you do not have for it was nothing.

 
ntmmm >>:

Огромное спасибо! Вот только теперь вопрос к программерам: а можно ли, что бы дни недели не цветом рисовало, а все-таки писало в этом отрезке текстом?


Good day!

Glad my indicator - WeekDay in the forum - just that posted (in the tester does not work).

P.S.What you had everything and you do not have for it was nothing.

 
ntmmm >>:

Огромное спасибо! Вот только теперь вопрос к программерам: а можно ли, что бы дни недели не цветом рисовало, а все-таки писало в этом отрезке текстом?


Good day!

Glad my indicator - WeekDay in the forum - just that posted (in the tester does not work).

P.S.What you had everything and you do not have for it was nothing.

 
chief2000 >>:

Речь о новых котировках за время Оптимизации? - тогда можно удалить из тестирования последние день-два.

Этого будет достаточно? (в следующий раз проверю сделки по датам, хотя очень-очень маловероятно что результат мог измениться так сильно)






it's a small thing :-)

it's a beaten up topic, e.g. https://forum.mql4.com/ru/28749

but it's just a taste, you'll find more :-)

 

Hello all!

Please help me to find an error.

I need an algorithm to calculate the EMA.

int start()
{
  int iPeriod = 5;
  Print("iMA (ema) = \'"+DoubleToStr(NormalizeDouble(iMA(NULL, 0, iPeriod, 0, MODE_EMA, 0, 0), Digits), Digits)+
        "\', GetEMA = \'"+DoubleToStr(NormalizeDouble( GetEMA( iPeriod), Digits), Digits)+"\'.");
}

double GetEMA(int iPeriod)
{
  double dResult = 0.0;
  if ( iPeriod) {
    double k = 2.0 / ( iPeriod + 1);
    int iPos = iPeriod - 1;
    dResult = iClose(NULL, 0, iPos);
    
    iPos--;
    while ( iPos >= 0) {
      dResult = iClose(NULL, 0, iPos)* k + dResult*(1- k);
      iPos--;
    }
  }
  return ( dResult);
}

I would also appreciate an algorithm to calculate the SMMA.

Thank you!


P.S. I've looked in the terminal sources, haven't figured out what I've misinterpreted.

 
xeon >>:


это мелочи :-)

тема избита, например: https://forum.mql4.com/ru/28749

а вообще это все цветочки, покопаете дальше еще не то обнаружите :-)

Thank you!

 
voix_kas >>:

Всем привет!

Прошу помочь мне найти ошибку.

Необходим алгоритм расчета EMA.

Также буду благодарен за алгоритм вычисления SMMA.

Спасибо!


P.S. В исходниках терминала смотрел, не разобрался, чего я неправильно интерпретировал.

Look at how Moving Average (MA) is done in meta-quotes (there is a switch to CodeBase below)

 

I exported a CSV file (1 min from 1999) from the MT of one broker. Tried to import into MT of another broker - 1min received

No problem, from 1999. But here is something I do not understand how in the 2nd MT to receive 5, 15-min, etc. charts? - I.e. after importing 1 minute charts switched to

5 minute charts and it looks like MT is trying to download them from the internet instead of converting them from the existing 1-minute charts.

Rebooted MT - didn't help.

- Is there any normal solution for converting 1 MIN to higher timeframes?

 
chief2000 писал(а) >>

I exported a CSV file (1 min from 1999) from the MT of one broker. Tried to import into MT of another broker - 1min received

No problem, from 1999. But here is something I do not understand how in the 2nd MT to receive 5, 15-min, etc. charts? - I.e. after importing 1 minute charts switched to

5 minute charts and it looks like MT is trying to download them from the internet instead of converting them from the existing 1-minute charts.

Rebooted MT - didn't help.

- Is there any normal solution for converting 1Min to higher timeframes?

The script is in CodeBase, it's called period converter

 

Urain

Looked in the source code of the terminal. Can't tell the difference between the original and my fake.

However, the results are different. Consequently, I am doing something wrong. So I'm asking you to find my mistake.

P.S. Did not wait for a reply in this thread, had to open a new one. I propose to continue the discussion of my problem there, in order to avoid duplication.