According to your experience, how many indicators maximum could be implemented in an EA/strategy ? - page 3

 
Marco vd Heijden:

It's lighter then running 62 separate open charts.

No you don't de-attach them you create the handles once, in OnInit() function.

From that moment on you have an array with indicator handles (MQL5) that you can loop over to grab new values.

How much RAM do you use Marco ?

 
Icham Aidibe:

How much RAM do you use Marco ?

This depends on how often you call your indicators.

It takes a bit of time to calculate all results.

Not much, there will be a point where the timer runs too fast to complete the loop that is to be avoided this is usually < 1 sec.

But when you just call the loop every second or so, it's not a problem at all.

It also depends on the strategy.

You can use a shadow array.

So first you declare an array for the indicator handles.

Then you resize this array to SymvolsTotal(1) all symbols in marketwatch.

Then you loop over all symbols and create the handles.

Then you create results1 [] array.

This you also resize to symbolstotl(1)

Then you run the loop and grab the data for each instrument and store it into the results array.

That part i usually refer to as the PRE-LOADER.

So now you have 1 array with all indicators handles, and 1 array with indicator buffer values.

Then you run the loop for a second time so you create a shadow array like results2.

This you also resize to symbolstotal(1)

And you run the loop again over all instruments collecting the data into results2[] array.

This part i usually refer to as the RE-LOADER

Now you have one array with handles, and two array's with indicator data, one with older values results1[] and one with newer values results2[] 

And so you can compare and calculate many things by just making simple comparisons and overwriting values.

 
i'm using a laptop - without indicators (only prices) & 28 currencies, i've move such a loop from 1s to 1minute
 

It takes a bit of time but that does not matter if you are pulling PERIOD_D1 values.

In my case even a once or twice a day check would suffice.

You can enter on the first tick of breakthrough, but i found that it is usually better to wait for a few confirmations in signal.

There will be several confirmation if it will start trending and the first tick could be a false one...

Make of it what you want.

PS im talking about handles this is MQL5 not MQl4 you only have to pull the last few candles, not the entire amount of bars.
 
Marco vd Heijden:

It takes a bit of time but that does not matter if you are pulling PERIOD_D1 values.

In my case even a once or twice a day check would suffice.

You can enter on the first tick of breakthrough, but i found that it is usually better to wait for a few confirmations in signal.

There will be several confirmation if it will start trending and the first tick could be a false one...

Make of it what you want.

thank for your advices

 

As most of you already know, generalization/optimization is a problematic area.

By more indicators, you may feel comfortable in the testing period, but you surely pay for it in your real trades.

So in my view ... less indicators, less parameters, better algorithms for overall real trades.


Please look at the NFL (no free lunch) theorem ...

And if you are deeply interested in the subject, you can trace the related and the original ideas back to the inductive skepticism of 18th century.

 

I just voted.  I want to make a semi-automatic EA with 3 indicators.

I need to draw my own horizontal lines.

 

better don't have indicators at all...but if u use maximum one I think. Because indicators usually just predict the past.

 
Sometimes it is good to code some strategy elements as indicators (it helps mostly in backtests) but general rule is that the simplest solutions are the best.
Reason: