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

Re: [amibroker] Re: Is it possible to print the industry ID along with the backtest results?


  • To: <amibroker@xxxxxxxxxxxxxxx>
  • Subject: Re: [amibroker] Re: Is it possible to print the industry ID along with the backtest results?
  • From: "Tomasz Janeczko" <amibroker@xxxxxx>
  • Date: Sat, 23 Jul 2005 22:42:09 +0200

PureBytes Links

Trading Reference Links

Hello,

In this context IndustryID is a PROPERTY of stock object and has no parameters. So you should write
  txt = stk.IndustryID;

instead of:

  txt = stk.IndustryID(1) ;



Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message ----- 
From: "dbirru" <dbjunk@xxxxxxxxxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Saturday, July 23, 2005 8:59 PM
Subject: [amibroker] Re: Is it possible to print the industry ID along with the backtest results?


> Thanks for your suggestion. But, I probably need  one more help.
> I used the following code (part of a larger code) so that industryID
> is printed along with the back test results.
> 
> for( trade = bo.GetFirstTrade(); trade; trade = bo.GetNextTrade() )
>   {    StockSymbol = trade.symbol; 
>        AB = CreateObject("Broker.Application");
>        stk = AB.Stocks(StockSymbol);
>        txt = stk.IndustryID(1) ;
>        trade.AddCustomMetric("ID",txt);       
>  }
> 
> But, AB failed with the following message.
> Error 19.
> COM method/function 'IndustryID' call failed.
> 
> If I remove (1) and use  txt = stk.IndustryID instead, then it seem to
> work fine, but what is printed is numbers which is of no use to me.
> 
> Thanks agin.
> 
> --- In amibroker@xxxxxxxxxxxxxxx, "Tomasz Janeczko" <amibroker@xxxx>
> wrote:
>> Hello,
>> 
>> I answered too quickly :-( 
>> of course all functions are accessible, but inside custom backtest
> procedure 
>> current symbol is "~~~Equity", so IndustryID() will not help alone.
>> You would either use SetForeign or better use this code:
>> 
>> StockSymbol = "MSFT"; // you can substitute it by for example
> Trade.Symbol;
>> 
>> AB = CreateObject("Broker.Application");
>> 
>> stk = AB.Stocks(StockSymbol);
>> printf("%g", stk.IndustryID );
>> 
>> Best regards,
>> Tomasz Janeczko
>> amibroker.com
>> ----- Original Message ----- 
>> From: "Tomasz Janeczko" <amibroker@xxxx>
>> To: <amibroker@xxxxxxxxxxxxxxx>
>> Sent: Saturday, July 23, 2005 2:38 PM
>> Subject: Re: [amibroker] Is it possible to print the industry ID
> along with the backtest results?
>> 
>> 
>> > Hello,
> 
> 
>> > 
>> > Inside custombacktest all functions are accessible as usual.
>> > So just use:
>> > www.amibroker.com/f?industryid
>> > 
>> > 
>> > Best regards,
>> > Tomasz Janeczko
>> > amibroker.com
>> > ----- Original Message ----- 
>> > From: "dbirru" <dbjunk@xxxx>
>> > To: <amibroker@xxxxxxxxxxxxxxx>
>> > Sent: Saturday, July 23, 2005 2:13 PM
>> > Subject: [amibroker] Is it possible to print the industry ID along
> with the backtest results?
>> > 
>> > 
>> >>I have been trying to do this with custombacktest. But, could not find
>> >> a way to call the industry ID from custombacktest procedure.
>> >> Is it possible at all? 
>> >> If not, this could be  a nice addition to the next release.
>> >> 
>> >> 
>> >> 
>> >> 
>> >> 
>> >> Please note that this group is for discussion between users only.
>> >> 
>> >> To get support from AmiBroker please send an e-mail directly to 
>> >> SUPPORT {at} amibroker.com
>> >> 
>> >> For other support material please check also:
>> >> http://www.amibroker.com/support.html
>> >> 
>> >> 
>> >> Yahoo! Groups Links
>> >> 
>> >> 
>> >> 
>> >> 
>> >> 
>> >> 
>> >>
> 
> 
> 
> 
> 
> Please note that this group is for discussion between users only.
> 
> To get support from AmiBroker please send an e-mail directly to 
> SUPPORT {at} amibroker.com
> 
> For other support material please check also:
> http://www.amibroker.com/support.html
> 
> 
> Yahoo! Groups Links
> 
> 
> 
> 
> 
> 
>


------------------------ Yahoo! Groups Sponsor --------------------~--> 
Try Online Currency Trading with GFT. Free 50K Demo. Trade 
24 Hours. Commission-Free. 
http://us.click.yahoo.com/DldnlA/9M2KAA/U1CZAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to 
SUPPORT {at} amibroker.com

For other support material please check also:
http://www.amibroker.com/support.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/