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

Re: Shooting my own foot?



PureBytes Links

Trading Reference Links

Hi to all,

This is an alternative to the "stacking" method
outlined in 6081. But I can not get it to work.

It would be nice to be able to put the extra
data I want to use with each stock into a 
artifical ticker (one artifical ticker for each
stock) perhaps named as follows: IBMxxx to hold
the extra data related to the IBM ticker. Thus
extra data items for IBM could be stored
in the Open, High, Low, Close, Volume, OI 
fields of a ticker named IBMxxx. 

I have used artifical tickers successful when
just my AFL formula does not need to change the
name of the artifical ticker for each stock
in a backtest. Changing the name would be possible
if there is 1. a way to call up the ticker of
the current stock being backtested [the Name() call
is promising, but does not seem to work for me], 
and 2. an AFL operator that would combine the
Ticker Name (eg IBM) with the artifical ticker
identifier (eg, xxx) to give IBMxxx. Then the
regular Foreign (IBMxxx, close), etc calls could
be used to access the extra data. Here is the 
code I have tried but it does not work has hoped.

CurrentTicker = Name();// The Name function exits in AFL
StockString = (CurrentTicker + "xxx");// Is there a "string combine" 
operator?
xxxSignal_1 = Foreign (StockString, Open);// entry signal from 
IBMxxx's Open field
xxxSignal_2 = Foreign (StockString, Volume);// exit signal stored in 
IBMxxx's volume field
Buy = xxxSignal_1 > 10000;//
Sell = xxxSignal_2 < 12;

Any and all comments will be appreciated. Thank you.

b