Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers, Unverified Users Joined: 10/28/2004(UTC) Posts: 3,111 Location: Perth, Western Australia
Was thanked: 16 time(s) in 16 post(s)
|
Asish,
The results of my explorations and my charts match exactly, BUT there is a catch! This is what I did...
Exploration 1.
{ColA}
DX(14)
{filter}
{none}
Options:
Load 1300 records
Time taken to scan 2202 stocks : about 30 seconds
Results agree with charted values: YES
--
Exploration 2.
{ColA}
DX(14)
{filter}
{none}
Options:
Load 32767 records (the maximum number for explorations)
Time taken to scan 2202 stocks : about 1 minute
Results agree with charted values: YES
--
Exploration 3.
{ColA}
DX(14)
{filter}
{none}
Options:
Load MINIMUM records
Time taken to scan 2202 stocks : about 15 seconds
Results agree with charted values: NO
HOWEVER.... to match the value, the chart must also have the appropriate number of records loaded. I normally have the maximum amount chart loaded (65500 bars) (although there are not many stocks old enough to have this much data).
If I load 65500 bars, the value of DX(14) for one company is say, 22.
If I load 1300 bars, the value of DX(14) for the same company is 22.
If I load 30 bars, the value of DX(14) for the company 24.
So the results of Exploration 1 and Exploration 2 match the the chart only if I have 1300 bars or more loaded. The results of Exploration 3 match the chart if I have only 30 bars loaded.
I don't have the code for the DX indicator with me right now (I have it somewhere I am sure) but I am pretty sure it uses PREV type values in its computations, which means that the value today will contain a (small) amount of yesterdays value and the day before vale and the day before that... If you try to skimp on the data loading then you are going to skew the result of the exponential computation.
--
This goes to show the importance of having the right number of bars loaded in both your charts and explorations. Some people like to skimp on the bars loaded during explorations because they think it might save them time, but if you trade based on the results of an exploration that was producing flawed results because the indicators did not have enough history, then your trades will be flawed and you risk losing money.
If you think that you need to experiment to find the minumum number of bars to load without skewing the results then I think you are sailing too close to the wind and need to find another hobby. Take up skydiving, BASE jumping, wild-pig hunting or something else less dangerous to your health than computer programming.
If your explorations/system tests/code are taking too long to run, then:
1. Look carefully at your code.
How many PREV functions do you have? Are they really necessary in your code, or have you added them just to see the results in report column? How many calls to ExtFml(), FmlVar() and Fml() do you have? These all slow down the execution of the code and hence the exploration (and system tests too!)
2. Don't explore the entire universe of stocks, warrants, options, indexes, mining companies, retailers, manufacturers etc if you only trade, say oil stocks.
Separate your data into folders (your data provider should show you how, or there are third party software products available cheaply) so that you are scanning the minimum number of stocks; stocks that you actually trade. According to my data provider there are 2202 stocks on the ASX; so I scan only these without looking at options, warrants or indexes.
3. Get a faster computer.
The cheapest option is to add RAM. As much as you can afford, and as much as your motherboard can hold. It takes about 30 seconds to add a stick of RAM, and you do not need to be a professional nerd to do it.
The next cheapest option, after you have filled your quota of RAM is to get a faster HD. Look for one with caching, they are slighly faster than non-cached disks. SCSI discs are back in fashion, with 10000 RPM becoming the norm. Size does not necessarily equate to speed. Get the fastest disc your pocket can afford. Again, you do not have to be nuclear physicist to add another HD to your machine. It will take about 10 minutes. The last resort is to completely replace your machine (but don't throw the old one out!)
4. Manage your time better.
If you get stressed about an exploration that takes 2 minutes or five minutes to complete then I think you need to relax more and get out of the house! How much time could you save by managing your day better than trying to better manage a computer?
If you have any more questions, please ask.
I hope this helps.
wabbit :D
|