Thanks!!! Now it is behaving exactly as expected. It was the missing negation of the entry price that was messing everything up. Case closed!