I am trying to build my first AB function from scratch and I'm about to blow a circuit breaker. I am trying to create a function that takes the bar number of the most recent buy signal and then iterates through 5 consecutive bars (after the buy signal) testing each one's close to see if it is less than the buy price. What I have created so far is not worth posting as it is not even close to being correct.
(this is related to post below about reading profit/loss 'n' days after buy to see if I need to exit) Pete :-)
