[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[amibroker] Changing Symbol via COM Not Working



PureBytes Links

Trading Reference Links

I have a script that uses the Amibroker COM interface to change the symbol in several charts on my screen.

Every time I run the script it works for some charts and not for others.  All the symbols are in the amibroker database that I'm using.  Here's the code I'm using to change every chart to SPY:

my $ami = Win32::OLE->new("Broker.Application");

my $documents = $ami->Documents;

foreach my $document (in $documents) {
	my $current_symbol = $$document{name};
	if ($current_symbol ne 'SPY') {
		print "Current symbol is $current_symbol, changing symbol to SPY.\n";
		$$document{name} = "SPY";
	}
}
$ami->RefreshAll();

In this instance, there are charts with SPY in them and one with JEC in it.  When I run the script it changes the symbol briefly to SPY but then it immediately reverts it back to JEC.  I took a screencast of it here where you can see the top right chart go to SPY and then quickly revert back:

http://blog.stocktickr.com/wp-content/videos/amibroker/Amibroker%20Changing%20Symbol%20Via%20COM.html

Any ideas?



------------------------------------

**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to 
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/