Hi there,

I'm working an algorithm on minute resolution that enters a long position on an up-trend after one red and three green candles. So far, I think I've got the position entry down (there may be some look-ahead bias…I"m not sure).  However, I am having issues with closing positions on certain days. As you can see in the chart below the algo doesn't attempt to exit even though my exit conditions are met. I've been looking over it all day and am stumped as to where the problem is. Would very much appreciate someone to hold up a candle and show me what I am missing. 

Best,

Ali

Author