Wrapper for slow indicator for backtesting

 
If a technical indicator works very slow, and I wish to include it in an EA (using iCustom), is there a some "wrapper" that could cache the indicator results to a file based on the particular indicator inputs? This way I could get a better speed next time when I backtest it using the same set of parameters, since the "wrapper" could read the result from file rather than recalculate the result from the indicator.
 
jackee1234: If a technical indicator works very slow, and I wish to include it in an EA (using iCustom), is
  1. Writing to a file will be much slower!
  2. If it's slow, fix it. It's probably computing all bars per tick. See How to do your lookbacks correctly.
  3. Don't do per tick what you can do per bar or once you reach a trigger level.
  4. You should write a self documenting function instead of calling iCustom directly, see Detailed explanation of iCustom - MQL4 forum
  5. There are no mind readers here. No code we can only guess.
 
jackee1234:
If a technical indicator works very slow, and I wish to include it in an EA (using iCustom), is there a some "wrapper" that could cache the indicator results to a file based on the particular indicator inputs? This way I could get a better speed next time when I backtest it using the same set of parameters, since the "wrapper" could read the result from file rather than recalculate the result from the indicator.

First thing to do is to be sure your indicator code is optimized.

If yes and still slow, it may happens, you will have to write your "wrapper" or data cache yourself.

Reason: