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 [email protected], "Graham Johnson" <[EMAIL PROTECTED]> 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 >
