Download MetaTrader 5
To add comments, please log in or register
Use MQL5 Cloud Network. It is secure!
meir
5
meir 2015.07.22 06:30 

Hi.
I have my iCustom indicator. When I run my Expert include my indicator I got the message : "indicator is too slow, 3323 ms. rewrite the indicator, please"
What should I do to solve this problem

 

Thanks

Meir 

whroeder1
13641
whroeder1 2015.07.22 11:54  
  1. Change it so it only calculates changed bars.
    int counted = IndicatorCounted();
    int lookback = ... // iMA(period) has look back of period.
                       // buffer[i+2] has look back of 2
                       // use maximum of all.
    for(int iBar = Bars - MathMax(lookback, counted); iBar >= 0; --iBar) ...
  2. Reduce max bars on chart
  3. change it do only calculate visible areas
/
To add comments, please log in or register