Add additional bar data in WealthScript
Author: lookleft
Creation Date: 3/18/2014 6:28 AM
profile picture

lookleft

#1
I would like to test a strategy that implements a brute force method of checking for a potential trading signal on a future bar of a data series. This would require that I be able to add a bar to an existing data series and edit it during the script.

Is this possible in WL?

I can find information on editing data manually but not via a script.

Thanks in advance.
profile picture

Eugene

#2
QUOTE:
I would like to test a strategy that implements a brute force method of checking for a potential trading signal on a future bar of a data series. This would require that I be able to add a bar to an existing data series and edit it during the script.

Is this possible in WL?

I can find information on editing data manually but not via a script.

Thanks in advance.


Hi David,

How are you using Wealth-Lab, which version and build? I can see your account "davidsws" but the trial you took last December has expired this January. Couldn't find any repeat trial attempts from the "lookleft" account, though.

Found the name of your company in the ticket by "davidsws". The company indeed purchased a number of Wealth-Lab licenses but they have expired back in 2011-2012 without paying up the maintenance fee. So the question of product usage still remains.

P.S. Please use the "davidsws" account from now on as multiple usernames are not allowed as per our website's Terms of use.
profile picture

lookleft

#3
Hi Eugene,
I have two accounts because this one is personal and the other is work related. I try not to mix the two, so hopefully this still abides by the Term's of use. Either way, I keep an eye on the forum so as to stay aware of how your product is evolving and what functionality it has.

In regards to my problem, as you are aware I don't currently have access to a WL subscription for work or personal use. I finished the trial for work but they chose not to make the leap at this time. I have a personal trading system problem and went looking for a tool to answer it; WL being one of the obvious choices.

Does Wealth-Lab have the functionality I asked about?

Regards,
David
profile picture

Eugene

#4
Thanks for your clarification.

There is a workaround to manipulate a Bars object from a script, inserting a bar.
profile picture

lookleft

#5
Thanks Eugene,
That would be great! If I might just clarify my question, I specifically want to add an additional bar to the main OHLCV source data series. I presume the insert bar method you refer to also works for this.

Regards,
David

profile picture

Eugene

#6
It isn't necessarily what you're thinking. It only makes sense to tell about the workaround, considering your task as a whole and with the details. Maybe there's a different way of doing that something, not involving the modification of the OHLCV.
profile picture

Cone

#7
You cannot manipulate the main Bars object, but you can make a copy of it in "a Bars object" and add additional bars to that copy, a new Bars object.

Edit:
Let me qualify that statement a bit more...

You can change the OHLC/V values of the charted (main) Bars object from within a script, but you cannot change, add, or remove Dates (or bars) with the exception of using the AddCalendarDays() function.
profile picture

lookleft

#8
Cone/Eugene,
That does clear it up and possibly still leaves the door open for a solution. Here is a link to the type of outcome I am looking at:
http://www.quintuitive.com/2014/03/12/simulating-on-close-orders-with-interactive-brokers-ib/

It uses a brute force method of creating a range of future security prices to detect the price at which a trade signal would be generated. This price can then be used in a Limit On Close order. Hence the Signal and Action price could be the same event, or very close to it most of the same time.

I envisage that such a strategy would be produce trade signals for placement the next day. The actual trade signal would only appear on the chart after the next days real price data came in.

I hope this helps and maybe provides others with a few inspirational ideas.
Regards,
David

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).