Have you got set(TICKS); enabled so that trades are evaluated by tick as opposed to the close of the next candle?

also for a buy limit the buyprice must be negative, if positive it is a buy stop.