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

[amibroker] Risk ratio



PureBytes Links

Trading Reference Links




Hello,
 
Actually this is not the case.
It is possible to call OLE directly from AFL - 
calling methods was allowed long time ago,
now it is also possible to read properties - please 
check the READ ME from the latest release:
 

+ OLE properties can be retrieved (DISPATCH_PROPERTYGET) directly from AFL 
now using parameterless function syntax. This allows reading values exposed by 
OLE automation directly from AFL code. Example:
AB = <FONT 
color=#0000ff>CreateObject(<FONT 
color=#ff00ff>"Broker.Application"); Stocks = 
AB.Stocks(); // get collection<FONT 
color=#000000> Stock = Stocks.Item( <FONT 
color=#0000ff>Name() ); // 
currently selected <FONT 
color=#ff00ff>"FullName : " + Stock.FullName(); 
"Alias : " + 
Stock.Alias(); "Address : "<FONT 
color=#000000> + Stock.Address(); "Shares: 
" + Stock.Issue(); <FONT 
color=#ff00ff>"Book value: " + Stock.BookValue(); 
"Market : " + 
Stock.MarketID(); "WebID : "<FONT 
color=#000000> + Stock.WebID();
You can check if OLE object is valid by calling IsNull() function, 
example:
AB = <FONT 
color=#0000ff>CreateObject(<FONT 
color=#ff00ff>"Broker.Application"); Stocks = 
AB.Stocks(); // get collection<FONT 
color=#000000> Stock = Stocks.Item( <FONT 
color=#ff00ff>"INTC" ); <FONT 
color=#800000>if( <FONT 
color=#0000ff>IsNull( Stock ) ) { 
  printf<FONT 
color=#000000>("COM object invalid (Null) - symbol 
does not exist\n"); } <FONT 
color=#800000>else { 
  printf<FONT 
color=#000000>("COM object valid - you can access its 
methods\n"); 
}  
 
Best regards,Tomasz Janeczkoamibroker.com
<BLOCKQUOTE dir=ltr 
>
  ----- Original Message ----- 
  <DIV 
  >From: 
  dingo 
  To: <A title=amibroker@xxxxxxxxxxxxxxx 
  href="">amibroker@xxxxxxxxxxxxxxx 
  Sent: Friday, May 07, 2004 4:06 AM
  Subject: RE: [amibroker] I have a problem 
  with AB4.54 running the enclosed AA
  
  <FONT face=Arial 
  color=#0000ff size=2>Looks like you're trying to run JScript without telling 
  AB.
  <FONT face=Arial 
  color=#0000ff size=2> 
  <FONT face=Arial 
  color=#0000ff size=2>change to:
  <FONT face=Arial 
  color=#0000ff size=2> 
  <FONT 
  face="Courier New">EnableScript("jscript");<%<FONT 
  size=2>AB = 
  CreateObject("Broker.Application");AB.RefreshAll();<FONT 
  face="Courier New">%>
  <FONT 
  color=#0000ff><FONT 
  size=2>Looks like TJ's got a glitch in his syntax checker.
  <FONT 
  size=2> 
  d<SPAN 
  class=321580202-07052004>
  
  
    
    
    From: ronbo [mailto:ronbo@xxxxxxxxxxxxxx] 
    Sent: Thursday, May 06, 2004 9:14 PMTo: 
    AmibrokerSubject: [amibroker] I have a problem with AB4.54 
    running the enclosed AA
    4.53 runs fine.  have any errors with 4.54 reported, 
    that i missed, whichcauses the AB smart shutdown screen to 
    appear?Caution, if you run this code, change the WatchList # from 0 
    and 1 to WL'syou don't care 
    about---thanks,ronBuy=Cross( MACD(), Signal() 
    );Sell = Cross( Signal(), MACD() );Filter=Buy OR 
    Sell;AddColumn (Buy, "test");if (SelectedValue(Buy) == 
    1){CategoryAddSymbol("", categoryWatchlist, 0);}if 
    (SelectedValue(Sell) == 1){CategoryAddSymbol("", categoryWatchlist, 
    1);}AB = 
    CreateObject("Broker.Application");AB.RefreshAll();---Outgoing 
    mail is certified Virus Free.Checked by AVG anti-virus system (<A 
    href="">http://www.grisoft.com).Version: 
    6.0.676 / Virus Database: 438 - Release Date: 
    5/3/2004Send BUG REPORTS to 
    bugs@xxxxxxxxxxxxxSend SUGGESTIONS to 
    suggest@xxxxxxxxxxxxx-----------------------------------------Post 
    AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx (Web page: 
    <A 
    href="">http://groups.yahoo.com/group/amiquote/messages/)--------------------------------------------Check 
    group FAQ at: <A 
    href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
    Send BUG REPORTS to bugs@xxxxxxxxxxxxxSend 
    SUGGESTIONS to 
    suggest@xxxxxxxxxxxxx-----------------------------------------Post 
    AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx (Web page: 
    <A 
    href="">http://groups.yahoo.com/group/amiquote/messages/)--------------------------------------------Check 
    group FAQ at: <A 
    href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
    


Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html








Yahoo! Groups Sponsor


  ADVERTISEMENT 












Yahoo! Groups Links
To visit your group on the web, go to:http://groups.yahoo.com/group/amibroker/ 
To unsubscribe from this group, send an email to:amibroker-unsubscribe@xxxxxxxxxxxxxxx 
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.