I'm trying to write a short line of code to add to one of my trading systems. I need to write a line of code for a stop exit when the security price breaks the lowest low or highest high based on the 10 trading days prior to entry date. Does anyone have any ideas? I keep getting caught in loops. Thanks for your help.