Let me suggest some ideas that i use.
Nothing special i am not a pro programmer just experienced manager.
All trading begins from intraday and it is abolutely right to find many algo solutions on intraday timeframe and simplify it or adjust with portfolio management on EOD and higher periods.
For example i use real time intraday strategies with stop orders and take profit orders computed and placed anyway.
It s good if there is probability of problems with connection. It may happen at any unpredictable moment (old trading school).
I found that it is much more comfortable and may be portable to compute stop levels and to check if price upper/higher these levels before place stops instead of checking bool value returned by StopAt methods.
1. I ve rewritten some methods to improve execution and backtest speed:
For example i dont use BBUpper and BBLower, because better compute SMA and after that compute bbup and bbdown series as bbup = sma + StdDev.
Btw if you need StdDev it will be computed only once too.
2.1. I found that for example av = (H+L+C+O)/4 is computing 2-4 slowly than another method
Something like:
CODE:
Please log in to see this code.
If you want compute ds = ds1 +/- ds2, better replace it by analogy.
May be Eugene will override some operators later.
You may also try to use Parallel methods for computing. It may improves speed too.
At least my 45.000 bars are computed in 800-2000 ms depending on how many dataseries are used. It may be up to 50-60.
And now it takes 13-18 hours) or optimizations. Now you may see why i had to find solutions.
I tested Tasks also but not sure about breakthrough because i usually optimize 6-8 strategies on 4 cores cpu so not sure that it can greatly improve speed under WealthLab. I think WealthLab is working with threads too. Not yet sure i can improve something.
But i ve tried some GA computing examples in parallel threads started outside WealthLab - they are really running 2 times faster in parallel execution (Microsoft examples and smart threadpool with multicore mode) But theses examples are without any large dataserie.
You may find these examples and source code on MSDN, codeplex and codeproject.
But seems some improvements with DataSeries computing may really help.
Dont forget use Clear.Cache() or assign Null to arrayes - it frees memory and sometimes really improves speed.
I even tried to place some values and series in Struct outside classes (in general value type must be placed in stack wich is quicklier itslef and is quickly freed too )or even Strategy class to Struct - just to see what will happen - not sure but may be 3-5% of additional speed improvement.))
I hope Eugene wont criticize me.