Mql5 code idea of indicators for beginners? - page 2

 
Gerard Willia G J B M Dinh Sy #: https://www.mql5.com/en/docs/indicators/irsi

Yes but they just implement iRSI here and nothing is revealed about the inside workings of iRSI (maybe because it's proprietary code)

In here you will see an actual RSI algo, he does not use iRSI, he does does the function from scratch: https://www.mql5.com/en/code/20650

the code is very cryptic though and not understandable.

It would be nice to understand this "algo scaling":

 return(50.0*(workRsi[r][z+_change]/MathMax(workRsi[r][z+_changa],DBL_MIN)+1));
QQE
QQE
  • www.mql5.com
The QQE (Quantitative Qualitative Estimator) indicator consists of a smoothed Relative Strength Index (RSI) indicator and two volatility-based trailing levels (fast and slow).
 
- abdi:

This indicator has many writings on the chart and the previous entries are not lost when the time frame is changed

I have one that can help you, but I don't have the code
It is in Persian language

[zip archive link redacted by moderator]
Only if you make a indicator about ATR
Please send it to me
Thank you for giving me your time

Hi

Everything okay?

I just put the requested ATR code in codebase. https://www.mql5.com/en/code/46331 

If you have any questions do not hesitate.

Good day

 

I have some concerns about your multiple CodeBase publications:

  1. They are Indicators that the terminal already offers "built-in", so their is no advantage in using your indicator's instead.
  2. They are simply wrappers for the built-in indicator functions the MQL already offers, so again there is no advantage to using your indicators, neither manually nor via MQL iCustom() calls.

The only slightly possible value I see, is one where one can see examples how to use the indicator functions in code. However, that is already demonstrated in the documentation and in so many other CodeBase examples that offer much more "substance".

It would make much more sense, if you were publishing code that shows how the indicators actually work and how they are calculated internally, than just making "wrappers" for the internal functions.

So, I have to wonder, why are you creating so many CodeBase publications, that offer little to no value?

You have already published more that enough examples for "learning purposes". Is there really a need for more?

Consider publishing something else with more "substance" and value, instead of just "code wrappers".

 

Good morning
Thank you for your message which talks about the value of my code.

Close to zero. It deeply touches me


The value that I find in my codes and as said in the introductions to my codes is that they are very simple to understand.

The value they bring may not be where you expect!!!

The value IS the ease of understanding them and taking the first steps when faced with the example code which is attached to the functions in the official doc which are anything but simple.

Here I am looking, for example, at the codes for bulls and bears powers.
Let's take bulls power

178 lines of code, which ultimately don't provide much on how to use the function.

Barely 100 for my code which is essential with the use of the same function...

Put yourself in the place of a beginner who looks at this code and says

"wow to have bull power in code and to be able to connect to these buffers, I will need 178 lines!!!"

The value of my code is to show how to code simply.

With naming rules, code structure logic, good formatting, good documentation

So actually my codes for an ima() or an indicator with a buffer... it's a bit light

But look again at the ima() doc

https://www.mql5.com/en/docs/indicators/ima

It is even longer, 194 lines and very difficult to follow code logic.

Do you really think this will help?

My code which uses iMA() is 90 lines long!! It's not a good value!!!

But if we talk about indicators with more buffers and offsets a bit like ichimoku

https://www.mql5.com/en/docs/indicators/iichimoku  

262 lines of pure happiness no longer understanding anything about the functions when mine with the use of the same function is only 157 lines


I know that my codes help younger people to code and that I will take these first steps to continue helping people develop.


It's too easy to tell people "go Freelance" and leave them with unanswered questions and with docs or examples that are so far from reality.

It's too easy to ask people if their codes were generated by Chat GPT.

But if they can't find a simple code, what other means are there?

A very simple "and worthless" code can show that Mql5 is not as hard as that

Unless you want to show that coding in MQL5 requires a lot of knowledge and is reserved for an elite coder


You must speak as an Mql5 developer who has already had all these codes, all these libraries for many years, but what do you do with others who are starting to take their first steps correctly?

The codes that I offer in codebase are the bases of my own tools that I decided to share, because they are the first building blocks to be able to code faster with codes that I know are functional and well written.
The codes in the doc cannot do it!!!

Moving averages are in almost all trading strategies.
My “worthless” codes are a very good start to start building your toolbox.

My 97 lines are sufficiently bare of all extravagance to be used as a basic basis for an experienced coder who can take them for himself and add his own lines. above.

The codes in the doc cannot do it!!!

My “valueless” codes can be directly called such as by an icustom or indicator because they are well optimized and the global values will not conflict with other globals
It's not sure that this is the case with the codes in the documentation

Speaking of optimization, I very often see aberrations in the copybuffers in the codes that accompany the functions.

Even on a function as simple as iMA(), the copybuffer copies all the data each time it passes through oncalculate for just a new bar!!! My “worthless” codes do not make this glaring error!!!

There are lots of blatant errors that my “worthless” codes do not match the example codes in the doc, which is important for me to continue

I will continue to give codes that are easier than the example codes which accompanies the functions


I don't know what moderating power you have.

If you want to remove them from codebase, that will be your right and I will go with it.

A very nice day, I return to my “worthless” codes, I shouldn’t lose control

Documentation on MQL5: Technical Indicators / iMA
Documentation on MQL5: Technical Indicators / iMA
  • www.mql5.com
iMA - Technical Indicators - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
 
Fernando Carreiro #:

I have some concerns about your multiple CodeBase publications:

  1. They are Indicators that the terminal already offers "built-in", so their is no advantage in using your indicator's instead.
  2. They are simply wrappers for the built-in indicator functions the MQL already offers, so again there is no advantage to using your indicators, neither manually nor via MQL iCustom() calls.

The only slightly possible value I see, is one where one can see examples how to use the indicator functions in code. However, that is already demonstrated in the documentation


It's correct that examples are demonstrated in the API documentation, although we must admit that these examples are overinflated  and overly fleshed out.. which may provide more confusion than worth. Short, concise, reusable, and maintainable code is a goldmine to those who just landed in MQL5. I do wonder sometimes why an API needs to be riddled with overelaborated examples of a simple function call.
 
Thank you very much phade
 

Good morning

I am warned against your power as moderator. Obviously he's big.

Banning, erasing codes, obviously you are God in this little corner of the web.


So I only have a few questions and comments left.

Would you allow me to post other code for beginners in codebase, one for each native function of Mql5?


Just a remark.

I know of other code that "wraps" native functions which by your own definition should also be "valueless".

These codes without value are the native codes of the classes

https://www.mql5.com/en/docs/standardlibrary/technicalindicators/trendindicators

https://www.mql5.com/en/docs/standardlibrary/technicalindicators/oscillatorindicators

https://www.mql5.com/en/docs/standardlibrary/technicalindicators/volumeindicators

https://www.mql5.com/en/docs/standardlibrary/technicalindicators/bwindicators

Toutes ces classes sont basées sur l’utilisation des fonctions natives.

cima


bool CiMA::Create(const string symbol,const ENUM_TIMEFRAMES period,
                  const int ma_period,const int ma_shift,
                  const ENUM_MA_METHOD ma_method,const int applied)
  {
//--- check history
   if(!SetSymbolPeriod(symbol,period))
      return(false);
//--- create
   m_handle=iMA(symbol,period,ma_period,ma_shift,ma_method,applied);

CiIchimoku

bool CiIchimoku::Create(const string symbol,const ENUM_TIMEFRAMES period,
                        const int tenkan_sen,const int kijun_sen,const int senkou_span_b)
  {
//--- check history
   if(!SetSymbolPeriod(symbol,period))
      return(false);
//--- create
   m_handle=iIchimoku(symbol,period,tenkan_sen,kijun_sen,senkou_span_b);


I draw your attention to the methods help pages

No example code is provided!

https://www.mql5.com/en/docs/standardlibrary/technicalindicators/trendindicators/cima

https://www.mql5.com/en/docs/standardlibrary/technicalindicators/trendindicators/ciichimoku


And when we do a search on codebase with Cima or Ciichimoku, we can see that we have very very few results

Done right now

Cima in codebase returns 2 codes

CiIchimoku 0!! Zero !!!

I was planning to make example codes to show beginners how to use these valuable classes, but I don't think I'll do that anymore.

Or just one, to show that I know how to do it...

A very nice day waiting for your response


Documentation on MQL5: Standard Library / Indicators / Trend Indicators
Documentation on MQL5: Standard Library / Indicators / Trend Indicators
  • www.mql5.com
Trend Indicators - Indicators - Standard Library - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
 
Would you allow me to post other code for beginners in codebase, one for each native function of Mql5?
 
Gerard Willia G J B M Dinh Sy #: Would you allow me to post other code for beginners in codebase, one for each native function of Mql5?

No one is preventing you from making CodeBase publications. I did however, suggest that you consider publishing something else with more "substance" and value, instead of just "code wrappers".

Reason: