VPS.. "indicator is too slow, rewrite the indicator"... how to reduce Max bars in chart below 1000?

 

I have a multi-currency EA that works very well in my local computer.  However, when moving it to the MQL5 VPS, I get a warning saying  " indicator is too slow, rewrite the indicator, please". Looking on the web over solutions to this problem I found several solutions like:

1. Disable news.

2. reduce number of bars displayed in chart.

This second option makes the most sense, since there are 30 currency pairs in the EAs, so if everyone of them has a chart, this may result in lots of candels. Given that one has not visual inspection of the charts in VPS, I figure one can leave the "Max bars in chart" to 1 or 2... however, every time I set that value, it gets restated back to 1,000 bars... can that value be any lower than 1,000 bars?

 
Camilo Mora:

I have a multi-currency EA that works very well in my local computer.  However, when moving it to the MQL5 VPS, I get a warning saying  " indicator is too slow, rewrite the indicator, please". Looking on the web over solutions to this problem I found several solutions like:

1. Disable news.

2. reduce number of bars displayed in chart.

This second option makes the most sense, since there are 30 currency pairs in the EAs, so if everyone of them has a chart, this may result in lots of candels. Given that one has not visual inspection of the charts in VPS, I figure one can leave the "Max bars in chart" to 1 or 2... however, every time I set that value, it gets restated back to 1,000 bars... can that value be any lower than 1,000 bars?

The problem is the indicator not the number of bars. What need be done is what the terminal says: "indicator is too slow, rewrite the indicator, please "

And what kind of indicator is that to make you think it can work with 1 or 2 bars only. If it somehow works with 2 bars only, definitely the indicator is very badly done to be that slow,

 

Do you really expect an answer? There are no mind readers here and our crystal balls are cracked, so we can't see your machine.
     How To Ask Questions The Smart Way. (2004)
          Be precise and informative about your problem

We can't see your broken code.

Always post all relevant code (using Code button) or attach the source file.

 

As indicated in the question, the indicator works fine in a local computer.


Multiple other posts exists about this problem when using some EAs in MQL vps (which provides 3 to 4gb of ram), and they all coincide that a solution is to reduce the number of bars displayed in the chart. The problem is that MQL5 does not appear to allow reducing the number of bars to less than 1,000, and the question is if that number can be set any lower...


As a case at hand, this EA described here generates that problem when run in VPS with 29 pairs .

The Implementation of a Multi-currency Mode in MetaTrader 5
The Implementation of a Multi-currency Mode in MetaTrader 5
  • www.mql5.com
For a long time multi-currency analysis and multi-currency trading has been of interest to people. The opportunity to implement a full fledged multi-currency regime became possible only with the public release of MetaTrader 5 and the MQL5 programming language. In this article we propose a way to analyze and process all incoming ticks for several symbols. As an illustration, let's consider a multi-currency RSI indicator of the USDx dollar index.
 
Camilo Mora #:

As indicated in the question, the indicator works fine in a local computer.


Multiple other posts exists about this problem when using some EAs in MQL vps (which provides 3 to 4gb of ram), and they all coincide that a solution is to reduce the number of bars displayed in the chart. The problem is that MQL5 does not appear to allow reducing the number of bars to less than 1,000, and the question is if that number can be set any lower...


As a case at hand, this EA described here generates that problem when run in VPS with 29 pairs .

I am still struggling with this error, even when using very simple EAs on multiple currencies (29 pairs). As indicated in this post, this error can be found even in "well written indicators in slow computers". I have reduced the number of bars in chart to 1,000 the smallest feasible, dissable news, and simplified the EA to have only one indicator, but the error still persists when the EA is deployed in VPS.


The fact that the error occurs sometimes, not always (when in VPS) but never when in local computer, suggest that this problem is an issue of available resources, and in evaluation of this, it seems the number of candles could be the problem. At 1,000 candles per chart, an EA with 29 pairs could have 29,000 candles.

If that many candles are not necessary, the question is why, will MQL5 restrict the minimum number of candles to 1,000?, why not to leave it up the user's discretion, such that resources can be optimized when deploying EAs in VPS?

The indicator is too slow, rewrite the indicator - How to fix an error in your EEA indicator?
The indicator is too slow, rewrite the indicator - How to fix an error in your EEA indicator?
  • 2014.10.15
  • Icham Aidibe
  • www.mql5.com
Here's the error message i get using and indicator on a ea. Anyone has experienced such an error. On a vps , it now shows this error with an other indicator (should i rewrite it to. This is definitely an error in your code