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

[amibroker] thanx: Q: same AFL working with different DBs ?



PureBytes Links

Trading Reference Links


William and Terry - thanks!
This is an elegant solution - I overlooked this Get... command.

--- In amibroker@xxxxxxxxxxxxxxx, William Peters 
<williampeters@xxxx> wrote:
> Hi,
> 
> Example, hope this helps.
> 
> 
> DB = GetDatabaseName();
> RUT = "";
> 
> if (DB == "Yahoo" ) {
>         RUT = "^RUT";
> }
> else if ( DB == "TC2K" ) {
>         RUT = "RUT-X";
> }
> 
> Plot( Foreign( RUT, "C" ), "", colorGreen );
> 
> 
> 
> Regards,
> William Peters (AmiBroker Group Moderator)
> www.amitools.com
> 
> 
> 
> 
> Sunday, December 19, 2004, 7:49:19 PM, you wrote:
>   
> d>  Usually different databases (DBs) have different tickers for 
the 
> d>  same index.
> d>  For instance, Yahoo has ^RUT, TC2000 for funds RUT-X for 
Russell 
> d>  2000.
> d>  I would like to have an AFL picking up whatever ticker is 
available
> d>  irrespective of the DB loaded, since I do not want a separate 
AFL 
> d>  for each DB.
> 
> d>  I was not successful. The following AFL does pick ^RUT from 
Yahoo 
> d>  (native AB US-stocks DB),
> d>  but does not pick RUT-X from TC2kF. If I were to switch the 
order of
> d>  ckecking for
> d>  the available ticker, it would pick that RUT-X if TC2kF is 
loaded,
> d>  but won't pick ^RUT
> d>  if load Yahoo DB.
> 
> d>  RUT =       IIf( NOT IsNull( Foreign("^RUT","C") ) ,  Foreign
> d>  ("^RUT","C"),                   //Yahoo
> d>                    IIf( NOT IsNull( Foreign("RUT-X","C")) ,  
> d>  Foreign("RUT-X","C"), Null));   // TC2K Funds
> 
> d>  Any suggestions for getting around this problem would be 
appreciated.
> d>  -Alex





------------------------ Yahoo! Groups Sponsor --------------------~--> 
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

Check AmiBroker web page at:
http://www.amibroker.com/

Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
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:
    http://docs.yahoo.com/info/terms/