I would like to mention one point which might be essential to find a solution: The 2nd symbol is always the same independent on the 1st symbol, means for all signals on the symbols within a list the contrary signals should be created on a single 2nd symbol, e.g. an index tracker like SPY.
--- In [email protected], "markhoff" <[EMAIL PROTECTED]> wrote: > > Hi folks, > > I'm struggeling with one idea which I would like to implement in AFL, > but I have no clue if it is possible. > The basic concept is to generate a buy/sell signal on two symbols at > the same time, based on the trigger from the actual (1st) symbol which > is evaluated by AA backtester (e.g. when processing a watchlist). > Stepwise Example: > > --- cut --- > > buy = <my formula to create the buy signal for the current symbol> > sell = <my formula to create the sell signal for the current symbol> > > positionsize = <my formula to calculate possize of the current symbol> > > // now my problem (algorithm description) > > if(buy == true) > { > sell_2nd_symbol = true; > positionsize_2nd_symbol = positionsize; > } > if(sell == true) > { > buy_2nd_symbol = true; > positionsize_2ns_symbol = positionsize; > } > > --- cut --- > > So I have to transfer both buy/sell signal and positionsize for each > trade of the 1st (actual) symbol to a 2nd symbol to create the > appropriate signals also here, and the trade for both symbols should > be done on the same DAY (no bar number, which might be different if > the size of my array for 1st symbol is different from 2nd symbol). > > I could not find any way to do it with the custom backtester, now I'm > not sure if I missed the right way or if I ran into a limitation of AB. > > Does anybody have a hint how to solve above problem? > > Thanks in advance and best regards, > Markus >
