Programmatically add symbol to the list of stocks processed by the formula

I searched the forum before posting. If I missed the answer I apologize.

My AFL uses the Norgate dynamic watchlist NASDAQ 100 Current & Past. However, there are a couple of additional symbols that need to be in the universe of stocks that are processed, namely ETFs when the system goes to cash.

I got this to work by using two watchlists and Match Any in my analysis settings. However, my collaboration partner would strongly prefer to just use a single watchlist, mainly due to Warning 508. Two watchlists also breaks a custom backtest I use for additional metrics, although I can workaround that by commenting out a couple lines and lose one of the metrics (the watchlist used).

I can derive the indicators I need via stocknum==0, SetForeign, and Static Variables, but I can't work out how to programmatically "append" this symbol(s) to the stocks processed by the formula so that it is actually used by the backtest when the system goes to cash.

Thanks...

If you use a CBT, you can enter trades for any symbol you want, even if it's not in your watchlist.

1 Like

This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.