Bar injection addin (Market replay)
Author: thetraderman
Creation Date: 4/7/2011 9:04 AM
profile picture

thetraderman

#1
I am new to wealth lab and learning a lot but I have a question regarding back testing and bar injection such as data provider simulator. I am currently building a custom indicator which is quite complicated. The issue I am having is as bars are being updated; the indicator can change its decision making on buy and sell signals. I understand this is a moving target but there are ways around it. What I would like to do is to inject one bar at a time like a debugger stepping through code and look at the events which occur through the system at my pace to help troubleshoot and fine tune the parameters. Is there a way I can do that? I have seen extensions in the forum where I can create a database but can I have WL take in one bar at a time? I know platforms like Ami-Broker provide that functionality.

Also with regards to the back testing, when WL executes previous bars, does it process that data looking forward one bar at a time or does it read all the data then goes back on runs your indicator on pre-existing data? The reason I ask is the former method will give very different results then the latter.

Any help would be appreciated.
profile picture

Eugene

#2
A Market Replay addin for Wealth-Lab 6 is in the works (later this year).
profile picture

Eugene

#3
Re: when WL executes previous bars, WL reads them in the loop. Check this out:

Introductory | Bars, Loops, and Bar + 1
profile picture

thetraderman

#4
For those folks who are interested in a bar injection simulator I found a method that could be used in the meantime which serves the same purpose. Sorry I didn't think of it earlier. On the left hand side pane select Date Range. Pick a string point (i.e 9/10/2008) and just change the end date. As you troubleshoot change the end date one bar at a time earlier or later. You can do this for as many bars as you like. It works only for daily but good enough for me. Thought I would share this tid bit of information :)
profile picture

thetraderman

#5
I was wondering when the real simulator will come out. I know sometime this year but do we know when? Will it be in the next release?
profile picture

Eugene

#6
It will not be a part of Wealth-Lab. It's an extension I'm planning to finish sometime later (or late) this year. It's a low priority.
profile picture

sourkraut

#7
thetraderman said
QUOTE:
Pick a string point (i.e 9/10/2008) and just change the end date.
Are you doing this programatically? If so, how? Doing this by hand is extremely tedious.

I too have attempted to find a way to step through the bars. I never got as far as changing the last data date. I got stuck on trying to restart the Execute() method.

Is there a way to programatically restart Execute from within a strategy?


Eb
profile picture

thetraderman

#8
Unfortunately I do it by changing the date manually and yes it is tedious. Hopefully we will have something more automated sometime soon but probably not till the end of the year.
profile picture

Eugene

#9
It's a helpful feature to have but there are higher priority projects out there. It's in my queue but not on top.
profile picture

streak

#10
Hopefully your priority list is working out, Eugene. I too look forward to being able to test with a replay; would like to reset the values of just the last 'x' number of a series' values, as the bars progress/increment!
profile picture

Eugene

#11
Still in the making. But making progress. Looking forward to release a basic version as a dummy streaming provider first and later on rewrite it as a tool (if it works out).
profile picture

Eugene

#12
P.S. Be prepared that its usability will (ahem) suck at first, there will be no pausing of replay - just starting and stopping by the Stream button. Anyway, 'we call it beta because it's beta than nothing'.
profile picture

Eugene

#13
Market Replay release delayed. Still requires more work and debugging. No ETA currently.
profile picture

streak

#14

No sweat. Am sure it'll be good to see in action.
thanks
profile picture

Eugene

#15
Beta version of Market Replay is ready to be released. However, the current implementation (as a Streaming provider) makes it impossible to replay a Strategy with historical trades, indicators etc. Given that only charts can be replayed (no buy/sell signals altogether) it makes pretty little sense to release it?
profile picture

streak

#16
Ah

that's a pity. Why was the beta developed around a streaming provider (one would think its use is with static data)?
profile picture

Eugene

#17
If you have an idea how to develop it against a static provider whose job is done after making a single data request, would you please share it here?
profile picture

streak

#18
Is it not requiring lower level code than general wealth script? ... I'm a 101! The earlier replay concept was a nice idea, though.

And maybe it could still be. I had wondered its ability to show some 'things' visually prior to orders. Hard to discuss without throwing novel concepts out the door!
profile picture

Eugene

#19
The idea of adding historical bars to a quasi-Streaming chart is evident, however, the implementation was delayed from an unresolved problem. When we're done with our high-priority project (on which the MS123 team has been working since last year), we'll revisit the MR addin.
profile picture

streak

#20
Thanks Eugene, it could open a few doors ( hmm ).
profile picture

abegy

#21
Do you have news about this add-on ?
profile picture

Eugene

#22
This project has been suspended.
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).