Errors, bugs, questions - page 697

 

Good afternoon.

I still can't change from ML4 to ML5.

I am creating a custom indicator that uses the values of zero and the first bar of the built-in indicator.

It would be perfect to use the example to build an indicator in a separate window that uses the values of the built in indicator for the previous bars for the current bar.

Thanks already.

Переход на новые рельсы: пользовательские индикаторы в MQL5
Переход на новые рельсы: пользовательские индикаторы в MQL5
  • 2009.11.23
  • Андрей
  • www.mql5.com
Я не буду перечислять все новые возможности и особенности нового терминала и языка. Их действительно много, и некоторые новинки вполне достойны освещения в отдельной статье. Вы не увидите здесь кода, написанного по принципам объектно-ориентированного программирования — это слишком серьезная тема для того, чтобы просто быть упомянутой в контексте как дополнительная вкусность для кодописателей. В этой статье остановимся подробней на индикаторах, их строении, отображении, видах, а также особенностях их написания по сравнению с MQL4.
 
ArkFatalist:

Good afternoon.

I still can't change from ML4 to ML5.

I am creating a custom indicator that uses the values of zero and the first bar of the built-in indicator.

It would be great to have an example with the indicator in a separate window that uses the values of the built in indicator for the previous bars for the construction of the current bar.

Thank you already.

What a smart forum we have, there is an automatic link in your question, follow it.

And the first thing you should pay attention to is the indexing direction. In MQL5, it is left to right by default. Although, there are functions to control the indexing.

Generally, it is difficult to describe in few words. Please, sit down and study.

 
Urain:
He didn't say what kind of boundary value you get, that's why I figured #IND. And in case of DBL_MAX, it's quite logical, if you can't calculate it.
Although you can do one trick, at each calculation add 1 cent to both Gross Porofit and Gross Loss.
Then the forward formula would be ((Gross Porofit+0.01)/(Gross Loss+0.01))
The formula for calculating the reciprocal value (when Gross Loss is bigger)
To do -((Gross Loss+0.01)/(Gross Porofit+0.01))
Well it is clear, that Gross Loss and Gross Porofit are modules.

Then the line will be symmetric on both sides, which is good for GA and there will be no incalculable situations at all.

But it will be useful not for you, but for people who write their own optimization criteria.

Thank you. Good trick. :)
 
Urain:

What a clever forum we have, there is an automatic link in your question, go to it.

The first thing you should pay attention to is the direction of indexing. In MQL5, it is left to right by default. However, it has functions to control the indexing.

I can't describe it in a nutshell. Sit down and study.

Clever)) Yes, I have already read it and found no answer.

Moreover, the attached file has the code. If I pointed to draw an array (1 - DerADX0), it was drawing ADX one-on-one. If I pointed to draw an array (2 - DerADX1), it drew a strange indicator, I never understood how it was obtained. In addition, after each tick in the indicator window for half a second there was no image (the name of the indicator too). Also, there is no image in the window all the time, if I specify to draw an array (0 - DerADX), which, in fact, I need.

That's my point. I probably didn't put it that way in the topic above. I apologise for being so unclear.

Thanks again.

Files:
DerADX.mq5  5 kb
 
Is it possible to ask a question here to the administration, about MT4 (silence on MKL4)?
 
220Volt:
Is it possible to ask a question here to the administration, about MT4 (silence on MKL4)?

Have you tried knocking on the service desk?

 
alexvd:

Have you tried knocking on the service desk?

It's not about the error, it's about what's missing from the help. There was a question here -https://www.mql5.com/ru/forum/138702
DLL, MT4 и cdecl - MQL4 форум
  • www.mql5.com
DLL, MT4 и cdecl - MQL4 форум
 

Hello.

The MT5 terminal does not correctly plot the SSA and SSB lines in the Ishimoku indicator.

Just compare the W1 timeframe with parameters 9, 26, 52 and the D1 timeframe with parameters 45, 130, 260. It would be the same picture.

 
evm180:

Hello.

The MT5 terminal is not correctly plotting the SSA and SSB lines in the Ishimoku indicator.

It's enough to compare observations on timeframe W1 with parameters 9, 26, 52 and observations on timeframe D1 with parameters 45, 130, 260. It would show the same picture.


Here is the calculation of the Ishimoku values, I cannot tell right away that the daily and weekly bars will give the same values. Did you check it?

   for(int i=limit;i<rates_total;i++)
     {
      ExtChinkouBuffer[i]=Close[i];
      //--- tenkan sen
      double high=Highest(High,InpTenkan,i);
      double low=Lowest(Low,InpTenkan,i);
      ExtTenkanBuffer[i]=(high+low)/2.0;
      //--- kijun sen
      high=Highest(High,InpKijun,i);
      low=Lowest(Low,InpKijun,i);
      ExtKijunBuffer[i]=(high+low)/2.0;
      //--- senkou span a
      ExtSpanABuffer[i]=(ExtTenkanBuffer[i]+ExtKijunBuffer[i])/2.0;
      //--- senkou span b
      high=Highest(High,InpSenkou,i);
      low=Lowest(Low,InpSenkou,i);
      ExtSpanBBuffer[i]=(high+low)/2.0;
     }
 
The formula for calculation is the same. The picture should be the same. Because if on D1 you build the indicator with parameters 9, 26, 52 and then multiply by 5 (number of days in the week), then it should be the same as on W1 9,26,52. On MT4 it is the same.
Reason: