Who can help me to write this code?

 

Hello friends..I have a question that I think is difficult programming, but I think that many here are able to guide me.

I want to calculate the lowest moving average level during a certain number of candles, as well as the highest moving average level during a certain number of candles.

That is, I want the moving average top and the moving average bottom, not the price.

How do I write a function that returns these values ​​to me?

Thank you for your interest and help

 
Help with what? You state a want. Show your try and you will get help
 
hre007: I want to calculate the lowest moving average level during a certain number of candles, as well as the highest moving average level during a certain number of candles.

Read the values into an array. Use ArrayMaximum/ArrayMinimum to find what you want.

 
hre007:

Hello friends..I have a question that I think is difficult programming, but I think that many here are able to guide me.

Nooo this is not so difficult. But it takes time and effort to understand the different parts, namely arrays and for loops.

So if you think this is hard, that means you haven't even taken a good sniff at the basics. No offense, you are just beginning.

Why don't you try and find a tutorial on how to build a simple MA Expert Advisor.

AH... also this:

https://www.mql5.com/en/articles/31

MQL5 for Newbies: Guide to Using Technical Indicators in Expert Advisors
MQL5 for Newbies: Guide to Using Technical Indicators in Expert Advisors
  • www.mql5.com
In order to obtain values of a built-in or custom indicator in an Expert Advisor, first its handle should be created using the corresponding function. Examples in the article show how to use this or that technical indicator while creating your own programs. The article describes indicators that are built n the MQL5 language. It is intended for those who don't have much experience in the development of trading strategies and offers simple and clear ways of working with indicators using the offered library of functions.
 
amando #:
Help with what? You state a want. Show your try and you will get help

Dear, I am a beginner in learning language and ideas, I may not even be able to start writing them or how to find them, so I asked for help

 
William Roeder #:

Read the values into an array. Use ArrayMaximum/ArrayMinimum to find what you want.

I'll start looking around for these. thank you very much for the guidance and help

 
Tobias Johannes Zimmer #:

Nooo this is not so difficult. But it takes time and effort to understand the different parts, namely arrays and for loops.

So if you think this is hard, that means you haven't even taken a good sniff at the basics. No offense, you are just beginning.

Why don't you try and find a tutorial on how to build a simple MA Expert Advisor.

AH... also this:

https://www.mql5.com/en/articles/31

Yes this is the fact that I am just starting to learn mql4.

But the problem I have is with the language, as the Arabic references that explain this language are scarce, superficial and incomplete.

and my English is weak and I do not master it well. But I will try hard to learn the basics and understand them well..

Thank you very much for your guidance and help

 
Although it is MQL5 you could take a look at the articles of this arab programmer:
 
Tobias Johannes Zimmer #:
Although it is MQL5 you could take a look at the articles of this arab programmer:

Even the Arabic programmer explains in English :D

 
hre007 #:

Even the Arabic programmer explains in English :D

But it might be easier to translate. 
and maybe he has some additional sources he can point you to.
Reason: