Questions from Beginners MQL5 MT5 MetaTrader 5 - page 488

 

Hello dear professionals.

Please advise who can. I need a simple moving average, with a function to calculate not only a given number of bars, but also to calculate the average of only bullish or only bearish bars. I can't figure out how to do it myself. i'm relying on you guys! I am totally relying on you guys!

 
Karatalmazovih:

Hello Dear Professionals.

Please advise who can. I need a simple moving average, with a function to calculate not only a given number of bars, but also to calculate the average of only bullish or only bearish bars. I can't figure out how to do it myself. i'm relying on you guys! I am totally relying on you guys!

How do you overlap the windows? I.e. if there is no value, then don't take it into account? You just need to make two arrays and then use the iMAOnArray function to go through them.
 

-Aleks-:
А окна как перекрывать? Т.е. если нет значения, то его не учитывать? Вам нужно просто сделать два массива, а потом по ним пройтись функцией iMAOnArray.

Which windows are you referring to?

 
The thing is, I'm so "green" at this, I can't even figure out how to do what you've written to me ((
 

Karatalmazovih:

Which windows are you referring to?

You have a row of numbers that you divide by a certain factor into two parts, so do you count the number dropped out of the row or not?

For example a row is: 1,-8,6,4,-5,4,-8.

Bulls: 1,6,4,4 or 1,0,6,4,0,4,0 ?

 
-Aleks-:

You have a row of numbers that you divide by a certain factor into two parts, so do you count the number dropped from this row or not?

For example a row is: 1,-8,6,4,-5,4,-8

Bulls: 1,6,4,4 or 1,0,6,4,0,4,0 ?

No, the eliminated number is not counted. In fact I need the average of either the bullish bars or the average of the bearish bars. ( 1,6,4,4. )
 
Karatalmazovih:
No, the number dropped out is not counted. In fact, I want the average of either the bullish bars or the bearish average. ( 1,6,4,4. )
Do you need a function or an indicator?
 
Karatalmazovih:
No, the number dropped out is not counted. In fact, I want the average of either the bullish bars or the bearish average. ( 1,6,4,4. )
I don't want to use an off-the-shelf indicator... But it would be very cool!
 
Hello. I am facing the following situation: I have to calculate several custom indicators inside the Expert Advisor. Question: How to make the arrays of these indicators appear visually when testing the Expert Advisor (the way they are displayed when they are called in the Expert Advisor through iCustom())? Thanks in advance.
 
Shepot:
Hello. I am facing the following situation: I had to calculate several custom indicators within the Expert Advisor. Question: How to make the arrays of these indicators appear visually when testing the Expert Advisor (the way they are displayed when they are called in the Expert Advisor through iCustom())? Thanks in advance.

Switch on visual testing, pause it, put the required indicators on the chart and continue testing! That is all!

Of course, all of the calculations made in the Expert Advisor should be displayed in the indicator settings, so that everything visually coincides! Good luck!