Jim Dean![]() Sage ![]() ![]() Posts: 3022 Joined: 9/21/2006 Location: L'ville, GA ![]() | Ahhh ... sorry I guess I had it backwards. You're right, N needs to create functions: Sector(Symbol), Group(Symbol) and SubGroup(Symbol) that return a string value for the ZG symbol related to the current symbol being processed. Since OLang is geared more around numeric returns, I suspect this will be a while coming. I actually did solve this problem for my MTV routine by creating a master excel csv data file that mapped all the supported stock symbols to the MG sector, group, subgrp ... so that by dint of a bunch of horsing around code, I could determine any of the three associated MG symbols, for whatever stock is current. This worked well, and fast. The problem of doing this for Zacks is that unlike MG, which has not been updated for about a decade, the mapping of stock symbols to the ZG symbols can change literally every day, to some degree or another. It would be an exercise in futility to try to maintain the excel "map" for Zacks, on account of that. HOWEVER, I do have a sorta-likely-to-work-around for you. As I understand it, you have a particular Zacks Sector or Group or Subgroup that you want to AVOID ... that is, any "current" stock symbol that is in the verboten ZG should be skipped and not processed. Is that correct? Second question: is it usually just one ZG######### that you're trying to avoid, or is it a collection of three or four or more of them? And finally ... are you using daily bars or intraday? (hint - my trick is much more likely to work for daily bars ... although maybe I can implement it for intraday with some hassling around. PS: the solution uses this capability, in a rube-goldberg kinda way [Edited by Jim Dean on 3/2/2021 1:56 PM] |