close condition only activates after profit
fixed bug when checking bar direction ( was checking last one instead of current )