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

Re: [amibroker] Setting the current ticker from afl



PureBytes Links

Trading Reference Links

Hello,

You should call Close() method after you are done, otherwise you will keep opening new ones.

AB = CreateObject("Broker.Application" ) ;

Docs = AB.Documents;

NewDoc = Docs.Open("Ticker" ) ;



... DO WHAT YOU HAVE TO DO...



NewDoc.Close(); // CLOSE document !


Best regards,
Tomasz Janeczko
amibroker.com
  ----- Original Message ----- 
  From: Herman 
  To: AmiBroker 
  Sent: Saturday, February 03, 2007 7:12 PM
  Subject: [amibroker] Setting the current ticker from afl


  At some point this code was provided by TJ to set the current ticker but it seems to require peripheral code to make it work properly.




  AB = CreateObject("Broker.Application" ) ;

  Docs = AB.Documents;

  Docs.Open("Ticker" ) ;




  The above code jumps to the first chart-tab and keeps opening new charts at each refresh. 




  All I need is to change the current ticker WITHOUT changing anything else, just like typing it in the Ticker window, but do it from afl. The purpose is so that when one of my positions changes my code will automatically update the layout to focus on the ticker and display relevant stats.




  Any software engineers around who know how to do this?




  Many thanks for any help you can give.

  herman

   
Content-Description: "AVG certification"
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.432 / Virus Database: 268.17.22/666 - Release Date: 2/3/2007 3:31 PM