A wild guess would be insufficient available cash set for the broker ( the default is just 10000$), although without seeing your code and data set it is hard to know.