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

 
Vitaly Muzichenko:

Add up simple dubs in a calculator and you will see. If you normalise each MA, the result will be skewed, but that's half the trouble, the trouble is that you are deliberately underestimating the speed of the program

your true)))
just subtract the array from the array...

 double zaz = ima1_massiv[0]-ima2_massiv[0];
    string zaz_str = DoubleToString(zaz,5);
    printf ("ЭКСПЕРИМЕНТ  "+zaz_str);
 
What function parameter is invalid?
   Print(ResourceCreate("Pict", mass, 1920, 1080, 0, 0, 0, COLOR_FORMAT_ARGB_RAW));
   Print(GetLastError());
I pass an array like this
uint mass[1920][1080];

The error is like this:

4051

ERR_INVALID_FUNCTION_PARAMVALUE

Invalid function parameter value


If I pass a one-dimensional array, everything works with the same parameters.
 

Is there any way to customize the indicator added viaChartIndicatorAdd?

The tutorial doesn't say anything about it, the usual methods like #property indicator_color1 do not work.

 
Maybe one of the professionals in this thread has a function for comparing two one-dimensional arrays of type string with different dimensions? The result should be a message about absence of a string value in one of the arrays, or better put the information in separate arrays about absence. The arrays may be very large, so I don't want to use brute force.
 

Hi.

I have already figured out how to get an indicator from an indicator in the terminal. I just need to put e.g. MA on the indicator window and select to apply it to the prices of the last indicator.

How to get the value of such MA in MQL4?

 
Photic:

Hi.

I have already figured out how to get an indicator from an indicator in the terminal. I just need to put e.g. MA on the indicator window and select to apply it to the prices of the last indicator.

How to get the value of such MA in MQL4?

iMAOnArray
iMAOnArray - Технические индикаторы - Справочник MQL4
iMAOnArray - Технические индикаторы - Справочник MQL4
  • docs.mql4.com
В отличие от iMA(...), функция iMAOnArray не выбирает данные на основе названия инструмента, таймфрейма и используемой цены - ценовые данные должны быть подготовлены заранее...
 
OK. Got it. As there is no CopyBuffer() here, the array will have to be created and filled by myself.
 
Photic:
OK. Got it. Since there's no CopyBuffer(), the array will have to be created and filled by itself.

It is enough to build the recalculation of the indicator in a slightly different way. First, if there are no bars, pass through the entire history, thus filling the array, then another condition, that the calculated bars equal to the total number of bars, read the last bar and this array, the indicator buffer, pass to iMAOnArray.

You can do it in one cycle, but starting from a bar not less than the averaging period, after the recalculation of the next bar, read iMAOnArray

In general, flight of fancy and repeatedly checking the result.

 
how to make the indicator show me data from M5 on H1
 
perhaps this has been discussed somewhere ?
Reason: