Can close position only and cant open new position

My program should send out two orders , cover and short, reverse position but everytime can only close position and cant open new position at out of regular hours


The program can function properly during regular trading hours, the error only occur Outside Regular Trading Hours