I'm working on an algorithm that trades every minute. Since the trades are so frequent, the idea of this algorithm is based on compound interest from small gains. However it has been unsuccessful due in part to my trades not going through until the minute following my buy/sell signals.
I'm using market orders with a feasible amount based on the security's volume to ensure the trades go through. Furthermore, I have done trades of this size for this particular security and can confirm that they happen immediately.
EDIT: I have implemented order_optimal_portfolio for both buy and sell but still have issues with trades happening 1 minute late.
Sample of Logs:
2018-04-30 06:31 PRINT ('49.77', '0.0190', '1.71', '1.95', '1568.29', 14)
2018-04-30 06:32 PRINT ('49.74', '0.0159', '-0.05', '1.88', '-103.18', 15)
2018-04-30 06:33 PRINT ('49.74', '0.0138', '0.00', '1.80', '-107.41', 16)
2018-04-30 06:34 PRINT ('49.48', '0.0074', '-0.52', '1.27', '-13099.48', 17)
2018-04-30 06:34 PRINT Buy Signal
2018-04-30 06:35 PRINT ('49.50', '0.0067', '0.04', '1.31', '-107.73', 18)
2018-04-30 06:36 PRINT ('49.54', '0.0066', '0.09', '1.34', '119.91', 19)
2018-04-30 06:37 PRINT ('49.75', '0.0093', '0.42', '1.88', '367.77', 20)
2018-04-30 06:37 PRINT Sell Signal
2018-04-30 06:38 PRINT ('49.68', '0.0068', '-0.14', '1.82', '-133.84', 21)
2018-04-30 06:38 PRINT Buy Signal
2018-04-30 06:39 PRINT ('49.80', '0.0080', '0.24', '2.02', '-271.67', 22)
2018-04-30 06:40 PRINT ('49.87', '0.0082', '0.14', '2.28', '-40.14', 23)
2018-04-30 06:41 PRINT ('49.88', '0.0072', '0.02', '2.11', '-88.90', 24)
2018-04-30 06:42 PRINT ('49.98', '0.0080', '0.20', '2.44', '1149.80', 25)
2018-04-30 06:43 PRINT ('50.14', '0.0097', '0.32', '2.58', '59.68', 26)
2018-04-30 06:43 PRINT Sell Signal
2018-04-30 06:44 PRINT ('50.07', '0.0073', '-0.13', '2.34', '-141.74', 27)
2018-04-30 06:44 PRINT Buy Signal
2018-04-30 06:45 PRINT ('49.98', '0.0047', '-0.19', '0.43', '38.99', 28)
2018-04-30 06:45 PRINT Buy Signal
2018-04-30 06:46 PRINT ('50.10', '0.0061', '0.24', '0.73', '-229.27', 29)
2018-04-30 06:47 PRINT ('50.20', '0.0070', '0.20', '0.92', '-16.87', 30)
2018-04-30 06:48 PRINT ('50.19', '0.0059', '-0.02', '1.43', '-109.98', 31)
2018-04-30 06:49 PRINT ('50.59', '0.0120', '0.79', '2.19', '-4050.79', 32)
2018-04-30 06:49 PRINT Sell Signal
On the full backtest page under transaction:
6:35 Buy
6:38 Sell
6:39 Buy
6:44 Sell
6:45 Buy
6:46 Buy
6:50 Sell
Please feel free to school me on anything I may be ignorant of