Reusing Study ID codes

I’ve been incorporating more fib items - fans and replacements into my trading plan and would like to set up a scan to identify when a stock is near (within .5% say) of a study line. I also would prefer that as i go from chart to chart and add, say, fib retracement lines that I don’t have to open each one individually. So two questions:

  1. Is there a way to preset the study ID of a drawing so every time i add a fib retracement its preset? If not, is there a way to programatically (using AFL) go through a group of charts and set that?

  2. I see in the tutorial for Study ID that i can detect a crossover. Can I also detect when a stock is - say - within a few pennies or a certain distance from one of the lines in a study?