The batch transform function is being depreciated in favor of the history function, so I would start by swapping that out when working in minute mode. I am not positive, but my guess is that you are running into a pretty common problem that comes up when switching from daily to minute mode. When in minute mode, handle_data is called on every bar, that means that you are potentially placing orders every minute.
Also, the 'target' style orders are naive to any pending open orders that you may have. For example, if you use order_target(stock, 10) for two consecutive minutes, and only 5 shares from the first minute filled, you will end up with (5 from bar1 + 5 from bar2 + 5 from bar1 when it fills) = 15. The safest way around that is to not trade when you have open orders, the line below should handle that.
if get_open_orders():
return
As for the trading on every bar, I'm guessing you really only want to trade once per day. I wrote this post a while ago to demo one way to handle switching from daily to minute mode. If you look around at other minute data examples you will find something that works for you.
Also, when switching from daily to minute bars, the results should be in the same ballpark, but don't expect them to be exactly the same. Unless every order fills at the close price of each day, the input data is different, which means the output will also be different. Hopefully I covered the issue you ran into, you can message me from my profile page if you run into any issues, I'd like to see this algo on run minute data too.