The indicator is too slow, rewrite the indicator

Icham Aidibe
11958
Icham Aidibe  

Hi !

Here's the error message I get using and indicator on a EA. It worked perfectly, then show that.

Unfortunately, I restarted the terminal so I can't copy past the exact log.

Anyone has experienced such an error ?

PS : it worked 'til now.

Yohana Parmi
9938
Yohana Parmi  
blouf:

Hi !

Here's the error message I get using and indicator on a EA. It worked perfectly, then show that.

Unfortunately, I restarted the terminal so I can't copy past the exact log.

Anyone has experienced such an error ?

PS : it worked 'til now.

Maybe the indicator need any pair of currency that doesn't available in your broker?
Alain Verleyen
40856
Alain Verleyen  
blouf:

Hi !

Here's the error message I get using and indicator on a EA. It worked perfectly, then show that.

Unfortunately, I restarted the terminal so I can't copy past the exact log.

Anyone has experienced such an error ?

PS : it worked 'til now.

I saw that message, for a well working indicator, on a very slow computer.
Icham Aidibe
11958
Icham Aidibe  
angevoyageur:
I saw that message, for a well working indicator, on a very slow computer.

Hi angevoyageur !

I couldn't see any topics related to such an error message. Good news that I don't have to rewrite the thing.

Thanks for your precision, I was desperatly wondering how to quick up an indicator :p

Lorentzos Roussos
24795
Lorentzos Roussos  
blouf:

Hi angevoyageur !

I couldn't see any topics related to such an error message. Good news that I don't have to rewrite the thing.

Thanks for your precision, I was desperatly wondering how to quick up an indicator :p

If there are things that dont need to be calculated with every tick , you can restrict those to be processed on every new candle.

For instance , if you are peeking at the H1 MA from M1 , you only need to do it at every M1 candle close , or (if you rely on candle 1 data) from H1 candle close
JFB
9
JFB  

This error occur when you have not enough memory. Even if you process only after bar closed. It's not an "every ticks" issue (may be with a slow computer).

If you have many indicators, and many graphics the key param is "Max bars in chart". May be you are used to set a big number because of back testing requirement.

When you are not testing, i.e. production with a VPS, you dont need a high max bars in chart.

Usualy you test an develop on a PC with, 2,4, 8GB memory.

Then you go to a VPS with 1 or 2 GB memory. 

If you forgot to lower max bar in chart, memory used by indicators are pagined. Then when the bar is closed, your EAs call indicators and Windows load from pagined memory the buffers used by indicators. And it takes 1,2 ... 4 seconds if you have several graphics who share memory in competition. Unfortunately, bars are close at the same time from differents symbols :-)

Then the warning message come.

So rather than rent more memory on your VPS, check the Max bars in chart parameters. 

Icham Aidibe
11958
Icham Aidibe  
JFB:

This error occur when you have not enough memory. Even if you process only after bar closed. It's not an "every ticks" issue (may be with a slow computer).

If you have many indicators, and many graphics the key param is "Max bars in chart". May be you are used to set a big number because of back testing requirement.

When you are not testing, i.e. production with a VPS, you dont need a high max bars in chart.

Usualy you test an develop on a PC with, 2,4, 8GB memory.

Then you go to a VPS with 1 or 2 GB memory. 

If you forgot to lower max bar in chart, memory used by indicators are pagined. Then when the bar is closed, your EAs call indicators and Windows load from pagined memory the buffers used by indicators. And it takes 1,2 ... 4 seconds if you have several graphics who share memory in competition. Unfortunately, bars are close at the same time from differents symbols :-)

Then the warning message come.

So rather than rent more memory on your VPS, check the Max bars in chart parameters. 

Hum I see ! Since I found a workaround, rewriting the indicator algorithms inside the EA shows better performances. Anyway, thanks, I never thought of the max bars parameters.
Icham Aidibe
11958
Icham Aidibe  
blouf:
Hum I see ! Since I found a workaround, rewriting the indicator algorithms inside the EA shows better performances. Anyway, thanks, I never thought of the max bars parameters.

On a VPS, it now shows this error with an other indicator (should I rewrite it to ?!), but it worked 'til now, it worked during optimization test ... This may be because of the server speed ?

Array out of Range
Stanislav Korotky
31762
Stanislav Korotky  
blouf:

On a VPS, it now shows this error with an other indicator (should I rewrite it to ?!), but it worked 'til now, it worked during optimization test ... This may be because of the server speed ?

This is definitely an error in your code. The error message contains line number where it happens.
Icham Aidibe
11958
Icham Aidibe  
marketeer:
This is definitely an error in your code. The error message contains line number where it happens.
Hm ..  it happens that the chart goes out of standard patterns. does it unload something ? the indicator ? or the ea go along ?
Mehrdad Shiri
4943
Mehrdad Shiri  
angevoyageur:
I saw that message, for a well working indicator, on a very slow computer.
thx.