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

[amibroker] Re: Get Current Symbol



PureBytes Links

Trading Reference Links

Hi Mike

I'll try and digest that in the morning - time for bed now.

What I had hoped to do was to get the symbol before the CBT is 
invoked, but if it has to be done in the CBT then so be it.

Thanks

Graham

--- In amibroker@xxxxxxxxxxxxxxx, "Mike" <sfclimbers@xxx> wrote:
>
> Hi,
> 
> When writing custom backtester code, you don't deal with a "current 
> symbol". Instead, you deal with signals and/or open positions 
and/or 
> completed trades.
> 
> Typically, you would iterate through the bars, then at each bar you 
> would iterate through one or more of the above collections to do 
> whatever you want to do (e.g. alter position size, calculate 
> statistics, etc.).
> 
> For both the Signal object and the Trade object (open and 
completed), 
> a property named "Symbol" is available. This would be the closest 
to 
> what you are asking for.
> 
> Note that if the "current symbol" that you are seeking is not in 
the 
> signal collection, open trade collection, or closed trades 
collection 
> for a given bar, then you would have to use something along the 
lines 
> of the Foreign function, static variables or composites to get at 
the 
> information.
> 
> See http://www.amibroker.com/guide/a_custombacktest.html for more 
> information on custom backtester code.
> 
> Mike
> 
> --- In amibroker@xxxxxxxxxxxxxxx, "Graham Johnson" <grahamj@> wrote:
> >
> > I thought this was going to be simple.
> > 
> > During the backtest, if there is a particular condition, I want 
to 
> > write the Symbol to a variable.
> > 
> > I've searched the User Doc and this forum, but no joy on how to 
get 
> the 
> > current symbol.
> > 
> > Graham
> >
>



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

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 NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

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/

<*> 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/