Download MetaTrader 5
To add comments, please log in or register
Did you like the article? Share it with your friends!
AlliumPorrum
89
AlliumPorrum 2009.03.03 00:04 

Hi!


I'm trying to create an EA using this indicator: http://www.earnforex.com/mt4_forex_indicators/Pattern_Recognition_Master_v3.mq4


Anyway, the EA seems to be reeeeally slow, and I noticed that it is loading & removing the indicator all over again every new candle. In the journal:


...

23:59:56 2008.04.18 12:00 Pattern_Recognition_Master_v3 EURUSD,H4: loaded successfully
23:59:56 2008.04.18 12:00 Pattern_Recognition_Master_v3 EURUSD,H4: removed
23:59:56 2008.04.18 16:00 Pattern_Recognition_Master_v3 EURUSD,H4: loaded successfully
23:59:56 2008.04.18 16:00 Pattern_Recognition_Master_v3 EURUSD,H4: removed
23:59:57 2008.04.18 20:00 Pattern_Recognition_Master_v3 EURUSD,H4: loaded successfully
23:59:57 2008.04.18 20:00 Pattern_Recognition_Master_v3 EURUSD,H4: removed
23:59:57 2008.04.20 22:00 Pattern_Recognition_Master_v3 EURUSD,H4: loaded successfully
23:59:57 2008.04.20 22:00 Pattern_Recognition_Master_v3 EURUSD,H4: removed
23:59:57 2008.04.20 23:00 Pattern_Recognition_Master_v3 EURUSD,H4: loaded successfully
23:59:57 2008.04.20 23:00 Pattern_Recognition_Master_v3 EURUSD,H4: removed
23:59:57 2008.04.21 00:00 Pattern_Recognition_Master_v3 EURUSD,H4: loaded successfully

...


What might cause this?? I have created a bunch of EA´s, but I have never seen this kind of behaviour before??

Bruno Gaiteiro
48
Bruno Gaiteiro 2009.03.03 00:15  

This usually happens when the iCustom is not correct. Check again or show the refered code.

Ronaldo
281
Ronaldo 2009.03.03 04:32  
AlliumPorrum wrote >>

Hi!

I'm trying to create an EA using this indicator: http://www.earnforex.com/mt4_forex_indicators/Pattern_Recognition_Master_v3.mq4

Anyway, the EA seems to be reeeeally slow, and I noticed that it is loading & removing the indicator all over again every new candle. In the

This is part of using iCustom. Another way is to embed the indicator into your EA - afterall an indicator is for visual purposes and as far as an EA goes, it does not have to "see" any charts, just the signals for orders execution

AlliumPorrum
89
AlliumPorrum 2009.03.03 20:42  

Thanks guys, that was it! As you can see there's quite much extern parameters in the indicator, and there was a stupid error with them in my EA.


Unfortunately the EA is still really slow in the tester, so the problem was not the reloading of the indicator, but the bad performance of the indicator itself. :=(


Does anyone know any other candle pattern indicators??

AlliumPorrum
89
AlliumPorrum 2009.03.03 21:20  

In fact, I just noticed that the loop in the start()- method of that indicator goes like this:


for (shift = 0; shift < Bars; shift++) {

...


Doesn't that mean that all bars are calculated all over again with every new candle?? Could this be done with some more effective way, so that only new candles are calculated..?

Ronaldo
281
Ronaldo 2009.03.04 16:10  
AlliumPorrum wrote >>

In fact, I just noticed that the loop in the start()- method of that indicator goes like this:

for (shift = 0; shift < Bars; shift++) {

...

Doesn't that mean that all bars are calculated all over again with every new candle?? Could this be done with some more effective way, so that only new candles are calculated..?

take a look at some of the indicators provided by metatrader and u will see some common codes to address this using IndicatorCounted()

int limit;
int counted_bars=IndicatorCounted();
//---- last counted bar will be recounted
if(counted_bars>0) counted_bars--;
limit=Bars-counted_bars;

AlliumPorrum
89
AlliumPorrum 2009.03.05 19:04  
Thanky you very much, now my EA works like a charm and fast as a light! :=)
Jorge Garza
6
Jorge Garza 2013.04.22 21:13  

alguien que me pueda decir cual es la sintaxis para llamarlo a través de iCustom()

 

Gracias !! 

Alain Verleyen
Moderator
28627
Alain Verleyen 2013.04.22 21:29  
ChStark:

alguien que me pueda decir cual es la sintaxis para llamarlo a través de iCustom()

 

Gracias !! 


Prueba aqui.
Simon Gniadkowski
Moderator
17963
Simon Gniadkowski 2013.04.22 21:49  
ChStark:

alguien que me pueda decir cual es la sintaxis para llamarlo a través de iCustom()


This is an English language Forum,  please use English if you are going to post . . ..  and please don't reply to posts that are 4 years old,  there is usually little point.
Alain Verleyen
Moderator
28627
Alain Verleyen 2013.04.23 08:58  
RaptorUK:
This is an English language Forum,  please use English if you are going to post . . ..  and please don't reply to posts that are 4 years old,  there is usually little point.

Oops...I missed it.
/ /12
To add comments, please log in or register