Code takes over 30 minutes to execute
Author: abegy
Creation Date: 3/29/2012 1:40 PM
profile picture

abegy

#1
When I run the following code, it takes more than 30 minutes to execute.
My external data are in ASCII format. I see not difference if I put in cache the external symbols.
Is something that I do not correctly ?

CODE:
Please log in to see this code.
profile picture

Eugene

#2
How big are your ASCII files? What's their bars count? Which data loading range and bar scale?
How fast is your CPU, how much RAM is installed?
If you replace the external symbol names with unique ones from a different provider e.g. Yahoo, what happens?
profile picture

abegy

#3
I have the same problem if I replace my dataset with another from MSN datasource.
My computer has 4GB with Windows 7 (version 32). I have a flash hard disk.
The CPU is a Duo Core 2 Extreme 3GHz.

External series has around 2500 bars but I run the strategy only for the last 50 bars.
The scale bar is a daily based.

For information, if I change true to false, I have the same result... An execution time extremely long (more than 30 minutes)
profile picture

Eugene

#4
Then I don't believe that this code is the culprit. It's something else.

1. Is on demand data update disabled?
2. What's your primary data provider? Can we see the rest of the code, or a minimally acceptable snippet that demonstrates the problem?

P.S. Is there a way to profile Wealth-Lab 6 Strategies i.e. measure application/script performance?
profile picture

abegy

#5
I have removed On demand data update and I have the same problem.
My primary data provider is Metastock file format.

When I add the last line in my script in a comment session (Eur_Value = GetExternalSymbol("EURERR", true);), I have no performance problem.
After a deeper investigation, I see that the symbol EUERR didn't exist.

It looks like the problem
profile picture

Eugene

#6
EURERR, it's the first time I see a Forex symbol like that... should've noticed that.

That's a clue. So are you saying this happens with any combination of primary/external data provider e.g. Metastock/MSN, Yahoo/ASCII, or only with Metastock being the primary provider?
profile picture

abegy

#7
I test it again and I confirm that it's not link to the source of the data. In all cases, because of the error in the symbol of default, the program spends a lot of time to execute the script.
profile picture

Eugene

#8
An inexistent ticker will produce an instant runtime error, provided that on demand update is disabled. Enabling it will take a little more CPU cycles to loop through the installed data providers.

If you're a 64-bit WL user (for example), try the following:

1. Install WL 32-bit side by side. [Or vice versa, assuming your OS is x64.]
2. Do NOT install any data provider extensions into this installation. These should be kept to the absolute minimum. Ideally, the built-in 5 providers is the best (MSN, Yahoo, ASCII, WL4Files and MetaStock).
3. Disable ALL visualizers but the Performance tab and the Equity Curve tab.
4. Uncheck "Benchmark Buy&Hold" in Preferences.
5. Run the simple script in 32-bit WL6 without anything else that you haven't shown to us:
CODE:
Please log in to see this code.

Double check that everything is set up as designed. Any difference?
profile picture

abegy

#9
After some tests as requested, I confirm you that the execution time is correct when Wealth-Labs is installed without extra library.
Do you want from me additional tests ?
profile picture

Eugene

#10
What is the extra library, which one?
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).