[amibroker] Re: Duplicating Symbols

2010-01-16 Thread dbwyatt_1999
Mike, By default, the "Local Data Storage" for PremiumData is turned off. I enabled it and the duplicate symbol data and information seems to save to the local database. I did quickly notice that by switching to local database from the Metastock plug-in that only the symbols I've previously l

[amibroker] Re: Duplicating Symbols

2010-01-15 Thread Mike
David, Keep in mind that if you use a local datasource, your PremiumData updates will not be reflected going forward. You will have to switch back to Metastock mode to receive the updates, as per their website: "How can I increase the scanning speed of AmiBroker?" http://www.premiumdata.net/su

[amibroker] Re: Duplicating Symbols

2010-01-15 Thread Mike
David, The code provided in my earlier post, below, works fine for me. Though, I've only tested it on the trial version of AB, so the new tickers do not get saved to the database (AB trial prevents that). After the Scan, the new tickers are definitely populated with data and render correctly

[amibroker] Re: Duplicating Symbols

2010-01-15 Thread dbwyatt_1999
I figured out how to get the symbol duplicating code to work. Both the AFL code that Mike posted and the javascript that I later posted work. The issue is database settings. PremiumData is setup using the MetaStock plug-in and for some reason setting quotes through ActiveX does not work when

[amibroker] Re: Duplicating Symbols

2010-01-15 Thread dbwyatt_1999
I've been unsuccessful in filling a duplicate symbol with quotes from a source symbol. I could not make it work in AFL, so I reluctantly switched to javascript and I still cannot get quote data into a new symbol. I guess I'm too close to my code because I cannot see what is wrong. Can anyone see

[amibroker] Re: Duplicating Symbols

2010-01-15 Thread dbwyatt_1999
Excellent Mike! Great suggestions. However the results of your modifications is similar to the results I was getting before. The code produces duplicate symbols with no quote data. Something is still not quite right with copying the quote data from the source symbol to the new duplicate symbo

[amibroker] Re: Duplicating Symbols

2010-01-14 Thread dbwyatt_1999
Thanks Mike, I appreciate the time you've spent thinking about implementing multiple systems and avoiding duplicate symbols. I originally went down the path of trying to use one symbol per market for 12 models and my system logic got out of hand. Using a separate backtester run for each model

[amibroker] Re: Duplicating Symbols

2010-01-14 Thread Mike
Try using DateTime instead. Also, the property is OpenInt, not OpenInterest. Finally, rather than entering all the tickers manually, just run a Scan over a watchlist of desired tickers. e.g. using a simplified version of your original post: // // AmiBroker OLE code to Duplicate a list of Symbols //

[amibroker] Re: Duplicating Symbols

2010-01-14 Thread Mike
Hmmm. Let me test my assumptions here: > I'm already using a uniquely named watchlist for each model > The unique symbol names are duplicates of a source symbol with incremental > numbers attached (e.g. ES, ES_2, ES_3, ..., ES_12) Those two quotes sound to me like you have 1. one uniquely name

[amibroker] Re: Duplicating Symbols

2010-01-14 Thread dbwyatt_1999
I'm already using a uniquely named watchlist for each model (in fact, I think I got the InWatchList idea from you Mike). I'm not sure I understand how putting the same symbol in multiple watchlists would work with multiple models. If I put the same symbol name in two different uniquely n

[amibroker] Re: Duplicating Symbols

2010-01-14 Thread dbwyatt_1999
Using OLE objects in AFL, what is the Date parameter format passed to the Quotations.Add() routine? I've tried DateNum values, DateTime values, and strings of Year + "-" + Month + "-" + Day. I've been unsuccessful in adding a quote to a new Symbol created with Stocks.Add(). Here's the relevan

[amibroker] Re: Duplicating Symbols

2010-01-14 Thread Mike
Hi, Why, exactly, do you want to duplicate the symbols in the first place? Why don't you just add the same symbol to multiple watch lists? If you are not actually changing the underlying bar data, I don't see why you would want to duplicate that data. If your logic is dependent upon parsing th

[amibroker] Re: Duplicating Symbols

2010-01-14 Thread dbwyatt_1999
I've attempted to code functionality to duplicate symbols using the AmiBroker OLE interface. In my test code below, 2 symbols ($A0 and $CA) are attempted to be duplicated into symbols $A0_2, $A0_3, $CA_2, and $CA_3. The duplication process entails: 1. adding a new symbol 2. setting