Questions from Beginners MQL5 MT5 MetaTrader 5 - page 1435

 
Alexey Viktorov #:

And what prevents you from looking at the code of the Alligator.mq5 indicator

i.e. you propose to create a different buffer for each level, because the standard MA indicator has one buffer, with the ability to set several levels.

or do I understand something wrong?

 
Tango_X #:

i.e. you propose to create a different buffer for each level, because the standard MA indicator has one buffer, with the ability to set several levels

or do I misunderstand something?

Even now you are too lazy to look and try to understand the proposed code?

 
Alexey Viktorov #:

Even now you're too lazy to look and try to understand the proposed code?

What code? You just suggested to create a buffer for each level! In plain language - if I have one MA indicator and have 100 levels in it, you suggest to create 100 MA indicators???? These levels are parallel to the main buffer, you just set their position from the main buffer.

 
Tango_X #:

what code? You just suggested to create a buffer for each level! In plain language - if I have one MA indicator and I have 100 levels in it, you suggest to create 100 MA indicators???? These levels are parallel to the main buffer, you just set their position from the main buffer.

There is no other option. Well, except for a canvas, but that would be without buffers at all.

 
Aleksey Vyazmikin #:

There's no other option. Well, except canvas, but that would be without buffers at all.

And if you programmatically throw the MA indicator on the chart via ChartIndicatorAdd - can you get to the levels here? And I don't understand how it's "no options". There is a parameter, but there is no access to it)?

 
Tango_X #:

and if you programmatically throw the MA indicator on the chart via ChartIndicatorAdd - can you get to the levels here? and I don't understand how it is "no options". There is a parameter, but there is no access to it)?

Haven't tried it, but I think it will just call the settings of these bars that were last set by the user.

 
Tango_X #:

what's the code?

Yes, apologies, I was very inattentive and rushed....

 
Yuriy Bykov #:
Are you using genetic or full optimisation?
I also used this approach to exclude obviously unnecessary combinations of parameters and did not notice incorrect optimiser performance. On the contrary, the optimiser worked exactly as expected.
You can try to add saving the missed parameter combinations to the database or a common file to check how many and which ones are really missed and to understand the reasons.
Using genetic optimisation.
Saving the optimisation variants to a file - I'll try that. Thanks for the idea!

 
When installing the EA on a chart in MT5, how to allow it to trade (open) only sell or buy (there are no such parameters in the options of the EA itself) ?
 
taramortom #:
I use genetic optimisation.

Then it seems that this is the case. Apparently, in genetic optimisation, the parameters responsible for turning oscillators on/off are strongly dominant with respect to oscillator parameters. That is, when breeding the next generation, one parent that has the gene for the switched off oscillator will kill a bunch of offspring from other parents with the switched on gene for this oscillator. That is, these descendants will be discarded by the condition of incorrect parameters, will not give offspring, and evolution will quickly come to a deadlock.
Try to look at the behaviour of the tester at full optimization on a short interval of the testing period. Will there be unnecessary omissions of combinations in this case?

Reason: