need help on mt5 indicator - page 2

 

Here's another indicator from the codebase that is simpler. For purposes of the OP, just ignore the lengthy custom function at the end of the master mq5 file.

Code Base

Brooky Trend Strength for MT5

Ryan L Johnson, 2025.04.29 19:52

This indicator calls 3 other subwindow indicators. All files go in your Indicators folder.

 
Conor Mcnamara #:

Do you understand what a public codebase is ...(

yeah, it just take a time and i am new in mql5 codebase , somepeople does not explain why thier code writtin that way in their code (for me it's building iron man suit with bunch of scraps), so it is just easy to ask
 
felonmvp #:
yeah, it just take a time and i am new in mql5 codebase , somepeople does not explain why thier code writtin that way in their code (for me it's building iron man suit with bunch of scraps), so it is just easy to ask

Start by breaking down a simple code. I made this which is clean and modular.

https://www.mql5.com/en/code/55622

You could paste this code I did into an AI, and ask it to comment it, because the AI is good to explain code, and it could comment things better than I could.

Look at Ryans code after you understand this much (if you want)

Portable Moving Average
Portable Moving Average
  • www.mql5.com
Calculate a moving average in one function call. Code that can easily be transported between different projects.